home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Macintosh Sample Code / Monthly Releases (Compressed) / MacDTS.Sample.Code.90.05.sit / SC.024.SoundApp / SoundApp.p < prev    next >
MacBinary  |  1990-05-01  |  136.1 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue May 1 12:00:00 1990, modified Tue May 1 12:00:00 1990, creator 'MPS ', type ASCII, 137037 bytes "SoundApp.p" , at 0x217cd 2054 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 53 6f 75 6e 64 41 | 70 70 2e 70 00 00 00 00 |..SoundA|pp.p....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 02 17 4d 00 | 00 08 06 a2 63 63 00 a2 |......M.|....cc..|
|00000060| 63 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |cc......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 af 5c 00 00 |........|.....\..|
|00000080| 7b 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |{~~~~~~~|~~~~~~~~|
|00000090| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000000a0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000000b0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000000c0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 0d 23 0d 23 20 |~~~~~~~~|~~~.#.# |
|000000d0| 41 70 70 6c 65 20 4d 61 | 63 69 6e 74 6f 73 68 20 |Apple Ma|cintosh |
|000000e0| 44 65 76 65 6c 6f 70 65 | 72 20 54 65 63 68 6e 69 |Develope|r Techni|
|000000f0| 63 61 6c 20 53 75 70 70 | 6f 72 74 0d 23 0d 23 20 |cal Supp|ort.#.# |
|00000100| 4d 75 6c 74 69 46 69 6e | 64 65 72 2d 41 77 61 72 |MultiFin|der-Awar|
|00000110| 65 20 53 6f 75 6e 64 41 | 70 70 20 41 70 70 6c 69 |e SoundA|pp Appli|
|00000120| 63 61 74 69 6f 6e 0d 23 | 0d 23 20 53 6f 75 6e 64 |cation.#|.# Sound|
|00000130| 41 70 70 0d 23 0d 23 20 | 53 6f 75 6e 64 41 70 70 |App.#.# |SoundApp|
|00000140| 2e 70 20 2d 20 4d 50 57 | 20 33 2e 30 2f 33 2e 31 |.p - MPW| 3.0/3.1|
|00000150| 20 50 61 73 63 61 6c 20 | 53 6f 75 72 63 65 0d 23 | Pascal |Source.#|
|00000160| 0d 23 20 4a 69 6d 20 52 | 65 65 6b 65 73 20 2d 20 |.# Jim R|eekes - |
|00000170| 4d 61 63 69 6e 74 6f 73 | 68 20 44 65 76 65 6c 6f |Macintos|h Develo|
|00000180| 70 65 72 20 54 65 63 68 | 6e 69 63 61 6c 20 53 75 |per Tech|nical Su|
|00000190| 70 70 6f 72 74 0d 23 20 | 43 6f 70 79 72 69 67 68 |pport.# |Copyrigh|
|000001a0| 74 20 a9 20 31 39 38 39 | 2d 31 39 39 30 20 41 70 |t . 1989|-1990 Ap|
|000001b0| 70 6c 65 20 43 6f 6d 70 | 75 74 65 72 2c 20 49 6e |ple Comp|uter, In|
|000001c0| 63 2e 0d 23 20 41 6c 6c | 20 72 69 67 68 74 73 20 |c..# All| rights |
|000001d0| 72 65 73 65 72 76 65 64 | 2e 0d 23 0d 23 20 56 65 |reserved|..#.# Ve|
|000001e0| 72 73 69 6f 6e 73 3a 0d | 23 20 09 09 09 31 2e 30 |rsions:.|# ...1.0|
|000001f0| 33 09 09 09 09 09 4d 61 | 79 2c 20 31 39 39 30 0d |3.....Ma|y, 1990.|
|00000200| 23 0d 23 20 43 6f 6d 70 | 6f 6e 65 6e 74 73 3a 0d |#.# Comp|onents:.|
|00000210| 23 20 09 09 09 53 6f 75 | 6e 64 41 70 70 2e 6d 61 |# ...Sou|ndApp.ma|
|00000220| 6b 65 09 09 4d 61 79 20 | 31 2c 20 31 39 39 30 09 |ke..May |1, 1990.|
|00000230| 09 09 4d 50 57 20 62 75 | 69 6c 64 20 73 63 72 69 |..MPW bu|ild scri|
|00000240| 70 74 0d 23 20 09 09 09 | 53 6f 75 6e 64 41 70 70 |pt.# ...|SoundApp|
|00000250| 2e 70 09 09 09 4d 61 79 | 20 31 2c 20 31 39 39 30 |.p...May| 1, 1990|
|00000260| 09 09 09 50 61 73 63 61 | 6c 20 73 6f 75 72 63 65 |...Pasca|l source|
|00000270| 20 63 6f 64 65 0d 23 20 | 09 09 09 53 6f 75 6e 64 | code.# |...Sound|
|00000280| 41 70 70 2e 72 09 09 09 | 4d 61 79 20 31 2c 20 31 |App.r...|May 1, 1|
|00000290| 39 39 30 09 09 09 52 65 | 7a 20 73 6f 75 72 63 65 |990...Re|z source|
|000002a0| 20 63 6f 64 65 0d 23 20 | 09 09 09 53 6f 75 6e 64 | code.# |...Sound|
|000002b0| 41 70 70 53 6e 64 73 2e | 72 09 09 4d 61 79 20 31 |AppSnds.|r..May 1|
|000002c0| 2c 20 31 39 39 30 09 09 | 09 52 65 7a 20 73 6f 75 |, 1990..|.Rez sou|
|000002d0| 72 63 65 20 63 6f 64 65 | 0d 23 20 09 09 09 53 6f |rce code|.# ...So|
|000002e0| 75 6e 64 55 6e 69 74 2e | 70 09 09 09 4d 61 79 20 |undUnit.|p...May |
|000002f0| 31 2c 20 31 39 39 30 09 | 09 09 50 61 73 63 61 6c |1, 1990.|..Pascal|
|00000300| 20 73 6f 75 72 63 65 20 | 63 6f 64 65 0d 23 0d 23 | source |code.#.#|
|00000310| 20 46 6f 72 6d 61 74 74 | 69 6e 67 20 77 61 73 20 | Formatt|ing was |
|00000320| 64 6f 6e 65 20 77 69 74 | 68 20 46 4f 4e 54 20 3d |done wit|h FONT =|
|00000330| 20 4d 6f 6e 61 63 6f 2c | 20 53 49 5a 45 20 3d 20 | Monaco,| SIZE = |
|00000340| 39 2c 20 54 41 42 53 20 | 3d 20 33 0d 23 0d 23 20 |9, TABS |= 3.#.# |
|00000350| 6d 61 6e 79 20 74 68 61 | 6e 6b 73 20 74 6f 3a 20 |many tha|nks to: |
|00000360| 42 6f 33 62 20 4a 6f 68 | 6e 73 6f 6e 2c 20 4d 61 |Bo3b Joh|nson, Ma|
|00000370| 72 6b 20 42 65 6e 6e 65 | 74 74 2c 20 41 6e 64 79 |rk Benne|tt, Andy|
|00000380| 20 53 68 65 62 61 6e 6f | 77 2c 20 4b 65 69 74 68 | Shebano|w, Keith|
|00000390| 0d 23 20 52 6f 6c 6c 69 | 6e 2c 20 43 68 72 69 73 |.# Rolli|n, Chris|
|000003a0| 20 44 65 72 6f 73 73 69 | 2c 20 50 65 74 65 20 48 | Derossi|, Pete H|
|000003b0| 65 6c 6d 65 2c 20 44 61 | 72 69 6e 20 41 64 6c 65 |elme, Da|rin Adle|
|000003c0| 72 2c 20 61 6e 64 20 6d | 79 20 63 6f 2d 77 6f 72 |r, and m|y co-wor|
|000003d0| 6b 65 72 73 20 74 68 61 | 74 0d 23 20 73 61 74 20 |kers tha|t.# sat |
|000003e0| 6e 65 61 72 20 6d 65 20 | 77 68 69 6c 65 20 49 20 |near me |while I |
|000003f0| 77 61 73 20 6d 61 6b 69 | 6e 67 20 6c 6f 74 73 20 |was maki|ng lots |
|00000400| 6f 66 20 6e 6f 69 73 65 | 20 74 65 73 74 69 6e 67 |of noise| testing|
|00000410| 20 74 68 69 73 20 61 70 | 70 6c 69 63 61 74 69 6f | this ap|plicatio|
|00000420| 6e 2e 0d 23 0d 23 20 54 | 6f 20 74 68 65 20 72 65 |n..#.# T|o the re|
|00000430| 61 64 65 72 2c 0d 23 0d | 23 20 53 6f 75 6e 64 41 |ader,.#.|# SoundA|
|00000440| 70 70 2e 70 20 69 73 20 | 61 20 73 61 6d 70 6c 65 |pp.p is |a sample|
|00000450| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 73 6f 75 | applica|tion sou|
|00000460| 72 63 65 20 66 69 6c 65 | 20 66 6f 72 20 64 65 6d |rce file| for dem|
|00000470| 6f 6e 73 74 72 61 74 69 | 6e 67 0d 23 20 74 68 65 |onstrati|ng.# the|
|00000480| 20 53 6f 75 6e 64 20 4d | 61 6e 61 67 65 72 2e 20 | Sound M|anager. |
|00000490| 20 49 74 20 72 65 71 75 | 69 72 65 73 20 74 68 65 | It requ|ires the|
|000004a0| 20 75 73 65 20 6f 66 20 | 74 68 65 20 53 6f 75 6e | use of |the Soun|
|000004b0| 64 55 6e 69 74 20 74 6f | 20 68 61 6e 64 6c 65 0d |dUnit to| handle.|
|000004c0| 23 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 73 6f 75 |# all of| the sou|
|000004d0| 6e 64 20 72 6f 75 74 69 | 6e 65 73 2e 20 20 54 68 |nd routi|nes. Th|
|000004e0| 69 73 20 70 6f 72 74 69 | 6f 6e 20 6f 66 20 74 68 |is porti|on of th|
|000004f0| 65 20 73 6f 75 72 63 65 | 20 63 6f 64 65 20 68 61 |e source| code ha|
|00000500| 6e 64 6c 65 73 20 74 68 | 65 0d 23 20 61 70 70 6c |ndles th|e.# appl|
|00000510| 69 63 61 74 69 6f 6e d5 | 73 20 6d 61 6e 61 67 65 |ication.|s manage|
|00000520| 6d 65 6e 74 20 6f 66 20 | 6d 65 6d 6f 72 79 2c 20 |ment of |memory, |
|00000530| 65 72 72 6f 72 73 2c 20 | 75 73 65 72 20 69 6e 74 |errors, |user int|
|00000540| 65 72 66 61 63 65 2c 20 | 65 74 63 2e 2e 0d 23 20 |erface, |etc...# |
|00000550| 54 68 65 20 72 65 61 64 | 20 6d 65 20 6e 6f 74 65 |The read| me note|
|00000560| 73 20 61 72 65 20 68 65 | 72 65 20 69 6e 20 74 68 |s are he|re in th|
|00000570| 65 20 73 6f 75 72 63 65 | 20 63 6f 64 65 20 62 65 |e source| code be|
|00000580| 63 61 75 73 65 20 70 65 | 6f 70 6c 65 20 74 65 6e |cause pe|ople ten|
|00000590| 64 20 74 6f 0d 23 20 6e | 6f 74 20 72 65 61 64 20 |d to.# n|ot read |
|000005a0| 74 68 65 6d 20 6f 74 68 | 65 72 77 69 73 65 2e 0d |them oth|erwise..|
|000005b0| 23 0d 23 20 53 6f 75 6e | 64 41 70 70 20 69 73 20 |#.# Soun|dApp is |
|000005c0| 61 20 64 65 6d 6f 6e 73 | 74 72 61 74 69 6f 6e 20 |a demons|tration |
|000005d0| 6f 66 20 74 68 65 20 53 | 6f 75 6e 64 20 4d 61 6e |of the S|ound Man|
|000005e0| 61 67 65 72 20 72 65 6c | 65 61 73 65 64 20 69 6e |ager rel|eased in|
|000005f0| 20 53 79 73 74 65 6d 0d | 23 20 36 2e 30 2e 78 2e | System.|# 6.0.x.|
|00000600| 20 20 53 6f 75 6e 64 41 | 70 70 20 69 73 20 61 6c | SoundA|pp is al|
|00000610| 73 6f 20 61 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |so a exa|mple of |
|00000620| 68 6f 77 20 74 6f 20 77 | 72 69 74 65 20 61 20 4d |how to w|rite a M|
|00000630| 61 63 69 6e 74 6f 73 68 | 0d 23 20 61 70 70 6c 69 |acintosh|.# appli|
|00000640| 63 61 74 69 6f 6e 20 74 | 68 61 74 20 70 65 72 66 |cation t|hat perf|
|00000650| 6f 72 6d 73 20 67 6f 6f | 64 20 75 73 65 72 20 69 |orms goo|d user i|
|00000660| 6e 74 65 72 66 61 63 65 | 20 61 6e 64 20 70 72 6f |nterface| and pro|
|00000670| 70 65 72 20 65 72 72 6f | 72 0d 23 20 68 61 6e 64 |per erro|r.# hand|
|00000680| 6c 69 6e 67 2e 20 20 42 | 65 6c 69 65 76 65 20 69 |ling. B|elieve i|
|00000690| 74 20 6f 72 20 6e 6f 74 | 2c 20 62 75 74 20 74 68 |t or not|, but th|
|000006a0| 65 20 53 6f 75 6e 64 20 | 4d 61 6e 61 67 65 72 20 |e Sound |Manager |
|000006b0| 70 6f 72 74 69 6f 6e 20 | 77 61 73 20 74 68 65 0d |portion |was the.|
|000006c0| 23 20 65 61 73 69 65 73 | 74 20 70 61 72 74 20 66 |# easies|t part f|
|000006d0| 6f 72 20 6d 65 20 74 6f | 20 77 72 69 74 65 2e 20 |or me to| write. |
|000006e0| 20 49 74 20 77 61 73 20 | 61 6c 6c 20 74 68 65 20 | It was |all the |
|000006f0| 75 73 65 72 20 69 6e 74 | 65 72 66 61 63 65 20 61 |user int|erface a|
|00000700| 6e 64 20 65 72 72 6f 72 | 0d 23 20 68 61 6e 64 6c |nd error|.# handl|
|00000710| 69 6e 67 20 74 68 61 74 | 20 77 61 73 20 74 68 65 |ing that| was the|
|00000720| 20 6d 6f 73 74 20 64 69 | 66 66 69 63 75 6c 74 2e | most di|fficult.|
|00000730| 20 20 4f 6e 65 20 74 68 | 69 6e 67 20 62 65 63 61 | One th|ing beca|
|00000740| 6d 65 20 76 65 72 79 20 | 63 6c 65 61 72 20 74 6f |me very |clear to|
|00000750| 0d 23 20 6d 65 20 69 6e | 20 74 68 65 20 63 6f 75 |.# me in| the cou|
|00000760| 72 73 65 20 6f 66 20 77 | 72 69 74 69 6e 67 20 74 |rse of w|riting t|
|00000770| 68 69 73 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |his appl|ication.|
|00000780| 20 20 54 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 | The fo|llowing |
|00000790| 61 78 69 6f 6d 20 69 73 | 0d 23 20 6f 6e 65 20 6f |axiom is|.# one o|
|000007a0| 66 20 74 68 65 20 66 65 | 77 20 67 72 65 61 74 20 |f the fe|w great |
|000007b0| 74 72 75 74 68 73 20 69 | 6e 20 74 68 65 20 75 6e |truths i|n the un|
|000007c0| 69 76 65 72 73 65 2e 0d | 23 0d 23 20 49 66 20 79 |iverse..|#.# If y|
|000007d0| 6f 75 20 77 72 69 74 65 | 20 61 20 4d 61 63 69 6e |ou write| a Macin|
|000007e0| 74 6f 73 68 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |tosh app|lication|
|000007f0| 20 77 69 74 68 6f 75 74 | 20 4d 61 63 41 70 70 2c | without| MacApp,|
|00000800| 20 79 6f 75 d5 72 65 20 | 77 6f 72 6b 69 6e 67 0d | you.re |working.|
|00000810| 23 20 74 6f 6f 20 68 61 | 72 64 2e 0d 23 0d 23 20 |# too ha|rd..#.# |
|00000820| 54 68 72 6f 75 67 68 6f | 75 74 20 74 68 65 20 64 |Througho|ut the d|
|00000830| 65 76 65 6c 6f 70 6d 65 | 6e 74 20 6f 66 20 53 6f |evelopme|nt of So|
|00000840| 75 6e 64 41 70 70 20 49 | 20 77 6f 75 6c 64 20 72 |undApp I| would r|
|00000850| 75 6e 20 69 6e 74 6f 20 | 74 79 70 69 63 61 6c 0d |un into |typical.|
|00000860| 23 20 73 69 74 75 61 74 | 69 6f 6e 73 20 74 68 61 |# situat|ions tha|
|00000870| 74 20 6d 61 6b 65 20 70 | 72 6f 67 72 61 6d 6d 69 |t make p|rogrammi|
|00000880| 6e 67 20 61 20 4d 61 63 | 69 6e 74 6f 73 68 20 74 |ng a Mac|intosh t|
|00000890| 6f 6f 20 68 61 72 64 2e | 20 20 57 68 65 6e 20 74 |oo hard.| When t|
|000008a0| 68 69 73 0d 23 20 68 61 | 70 70 65 6e 65 64 20 49 |his.# ha|ppened I|
|000008b0| 20 61 73 6b 65 64 20 6d | 79 73 65 6c 66 20 d2 77 | asked m|yself .w|
|000008c0| 68 61 74 20 77 6f 75 6c | 64 20 4d 61 63 41 70 70 |hat woul|d MacApp|
|000008d0| 20 64 6f 3f d3 20 61 6e | 64 20 74 68 61 74 20 77 | do?. an|d that w|
|000008e0| 61 73 20 66 6f 6c 6c 6f | 77 65 64 0d 23 20 62 79 |as follo|wed.# by|
|000008f0| 20 74 68 65 20 74 68 6f | 75 67 68 74 20 d2 74 68 | the tho|ught .th|
|00000900| 65 6e 20 77 68 79 20 61 | 6d 20 49 20 77 72 69 74 |en why a|m I writ|
|00000910| 69 6e 67 20 63 6f 64 65 | 20 74 68 61 74 20 69 73 |ing code| that is|
|00000920| 20 61 6c 72 65 61 64 79 | 20 6f 75 74 20 74 68 65 | already| out the|
|00000930| 72 65 0d 23 20 66 6f 72 | 20 6d 65 20 74 6f 20 75 |re.# for| me to u|
|00000940| 73 65 3f d3 20 20 49 20 | 73 74 61 72 74 65 64 20 |se?. I |started |
|00000950| 6f 75 74 20 69 6e 74 65 | 6e 64 69 6e 67 20 6f 6e |out inte|nding on|
|00000960| 20 77 72 69 74 69 6e 67 | 20 61 20 76 65 72 79 20 | writing| a very |
|00000970| 73 69 6d 70 6c 65 0d 23 | 20 61 70 70 6c 69 63 61 |simple.#| applica|
|00000980| 74 69 6f 6e 20 74 68 61 | 74 20 61 6e 79 6f 6e 65 |tion tha|t anyone|
|00000990| 20 63 6f 75 6c 64 20 72 | 65 61 64 2c 20 61 6e 64 | could r|ead, and|
|000009a0| 20 75 6e 64 65 72 73 74 | 61 6e 64 20 74 68 65 20 | underst|and the |
|000009b0| 53 6f 75 6e 64 20 4d 61 | 6e 61 67 65 72 2e 0d 23 |Sound Ma|nager..#|
|000009c0| 20 49 20 66 65 6c 74 20 | 74 68 69 73 20 6d 65 61 | I felt |this mea|
|000009d0| 6e 74 20 6e 6f 74 20 72 | 65 71 75 69 72 69 6e 67 |nt not r|equiring|
|000009e0| 20 74 68 65 20 70 65 72 | 73 6f 6e 20 74 6f 20 72 | the per|son to r|
|000009f0| 65 61 64 20 4f 62 6a 65 | 63 74 20 4f 72 69 65 6e |ead Obje|ct Orien|
|00000a00| 74 65 64 0d 23 20 50 61 | 73 63 61 6c 2e 20 20 49 |ted.# Pa|scal. I|
|00000a10| 20 61 63 63 6f 6d 70 6c | 69 73 68 65 64 20 70 61 | accompl|ished pa|
|00000a20| 72 74 20 6f 66 20 6d 79 | 20 67 6f 61 6c 2e 20 20 |rt of my| goal. |
|00000a30| 50 65 6f 70 6c 65 20 73 | 68 6f 75 6c 64 20 62 65 |People s|hould be|
|00000a40| 20 61 62 6c 65 20 74 6f | 0d 23 20 6c 65 61 72 6e | able to|.# learn|
|00000a50| 20 68 6f 77 20 74 6f 20 | 75 73 65 20 74 68 65 20 | how to |use the |
|00000a60| 53 6f 75 6e 64 20 4d 61 | 6e 61 67 65 72 20 28 69 |Sound Ma|nager (i|
|00000a70| 6e 20 69 74 73 20 70 72 | 65 73 65 6e 74 20 63 6f |n its pr|esent co|
|00000a80| 6e 64 69 74 69 6f 6e 29 | 2c 20 62 75 74 20 69 74 |ndition)|, but it|
|00000a90| 0d 23 20 64 69 64 6e d5 | 74 20 74 75 72 6e 20 6f |.# didn.|t turn o|
|00000aa0| 75 74 20 74 6f 20 62 65 | 20 73 75 63 68 20 61 20 |ut to be| such a |
|00000ab0| 73 69 6d 70 6c 65 20 61 | 70 70 6c 69 63 61 74 69 |simple a|pplicati|
|00000ac0| 6f 6e 20 61 73 20 49 20 | 68 61 64 20 68 6f 70 65 |on as I |had hope|
|00000ad0| 64 20 66 6f 72 2e 0d 23 | 0d 23 20 49 20 68 61 76 |d for..#|.# I hav|
|00000ae0| 65 20 70 75 74 20 61 20 | 6c 61 72 67 65 20 61 6d |e put a |large am|
|00000af0| 6f 75 6e 74 20 6f 66 20 | 63 6f 6d 6d 65 6e 74 73 |ount of |comments|
|00000b00| 20 69 6e 74 6f 20 74 68 | 65 20 63 6f 64 65 2e 20 | into th|e code. |
|00000b10| 20 54 68 69 73 20 69 73 | 0d 23 20 73 6f 6d 65 74 | This is|.# somet|
|00000b20| 68 69 6e 67 20 49 d5 6d | 20 72 65 61 6c 6c 79 20 |hing I.m| really |
|00000b30| 70 69 63 6b 79 20 61 62 | 6f 75 74 2e 20 20 50 65 |picky ab|out. Pe|
|00000b40| 6f 70 6c 65 20 64 6f 20 | 6e 6f 74 20 63 6f 6d 6d |ople do |not comm|
|00000b50| 65 6e 74 20 74 68 65 69 | 72 20 63 6f 64 65 0d 23 |ent thei|r code.#|
|00000b60| 20 65 6e 6f 75 67 68 2e | 20 20 45 61 63 68 20 70 | enough.| Each p|
|00000b70| 72 6f 63 65 64 75 72 65 | 20 68 61 73 20 61 20 70 |rocedure| has a p|
|00000b80| 61 72 61 67 72 61 70 68 | 20 74 68 61 74 20 73 68 |aragraph| that sh|
|00000b90| 6f 75 6c 64 20 65 78 70 | 6c 61 69 6e 20 77 68 61 |ould exp|lain wha|
|00000ba0| 74 20 74 6f 0d 23 20 65 | 78 70 65 63 74 20 74 68 |t to.# e|xpect th|
|00000bb0| 61 74 20 72 6f 75 74 69 | 6e 65 20 74 6f 20 64 6f |at routi|ne to do|
|00000bc0| 2c 20 61 6e 64 20 68 6f | 77 20 69 74 20 67 6f 65 |, and ho|w it goe|
|00000bd0| 73 20 61 62 6f 75 74 20 | 64 6f 69 6e 67 20 69 74 |s about |doing it|
|00000be0| 2e 20 20 54 68 65 72 65 | 20 61 72 65 0d 23 20 73 |. There| are.# s|
|00000bf0| 6f 6d 65 20 62 69 67 67 | 65 72 20 69 73 73 75 65 |ome bigg|er issue|
|00000c00| 73 20 74 68 61 74 20 49 | 20 77 69 6c 6c 20 70 75 |s that I| will pu|
|00000c10| 74 20 69 6e 74 6f 20 74 | 68 65 20 72 65 6c 65 61 |t into t|he relea|
|00000c20| 73 65 20 6e 6f 74 65 73 | 20 62 65 6c 6f 77 2e 0d |se notes| below..|
|00000c30| 23 20 54 68 65 72 65 20 | 61 72 65 20 73 6f 6d 65 |# There |are some|
|00000c40| 20 74 68 69 6e 67 73 20 | 74 68 61 74 20 6d 61 6b | things |that mak|
|00000c50| 65 20 74 68 65 20 4d 61 | 63 69 6e 74 6f 73 68 20 |e the Ma|cintosh |
|00000c60| 68 61 72 64 65 72 20 74 | 6f 20 64 65 76 65 6c 6f |harder t|o develo|
|00000c70| 70 20 66 6f 72 0d 23 20 | 74 68 61 6e 20 69 74 20 |p for.# |than it |
|00000c80| 73 68 6f 75 6c 64 20 62 | 65 2e 20 20 53 69 6d 70 |should b|e. Simp|
|00000c90| 6c 65 20 74 68 69 6e 67 | 73 20 73 68 6f 75 6c 64 |le thing|s should|
|00000ca0| 20 62 65 20 73 69 6d 70 | 6c 65 2e 20 20 54 6f 6f | be simp|le. Too|
|00000cb0| 20 6d 61 6e 79 20 74 68 | 69 6e 67 73 0d 23 20 6f | many th|ings.# o|
|00000cc0| 6e 20 74 68 65 20 4d 61 | 63 20 74 68 61 74 20 73 |n the Ma|c that s|
|00000cd0| 68 6f 75 6c 64 20 62 65 | 20 73 69 6d 70 6c 65 20 |hould be| simple |
|00000ce0| 61 72 65 20 6e 6f 74 2e | 20 20 4d 61 79 62 65 20 |are not.| Maybe |
|00000cf0| 73 6f 6d 65 64 61 79 20 | 74 68 65 73 65 20 74 68 |someday |these th|
|00000d00| 69 6e 67 73 0d 23 20 77 | 69 6c 6c 20 62 65 20 66 |ings.# w|ill be f|
|00000d10| 69 78 65 64 2e 0d 23 0d | 23 20 a5 20 47 65 74 46 |ixed..#.|# . GetF|
|00000d20| 6f 6e 74 49 6e 66 6f 20 | 72 65 71 75 69 72 65 73 |ontInfo |requires|
|00000d30| 20 61 20 70 6f 72 74 20 | 73 65 74 20 74 6f 20 74 | a port |set to t|
|00000d40| 68 65 20 66 6f 6e 74 20 | 69 6e 20 71 75 65 73 74 |he font |in quest|
|00000d50| 69 6f 6e 2e 20 20 49 66 | 20 49 0d 23 20 20 20 77 |ion. If| I.# w|
|00000d60| 61 6e 74 65 64 20 74 6f | 20 66 69 6e 64 20 74 68 |anted to| find th|
|00000d70| 65 20 68 65 69 67 68 74 | 20 6f 66 20 74 68 65 20 |e height| of the |
|00000d80| 53 79 73 74 65 6d 20 46 | 6f 6e 74 2c 20 49 20 68 |System F|ont, I h|
|00000d90| 61 64 20 74 6f 20 66 69 | 72 73 74 20 73 65 74 20 |ad to fi|rst set |
|00000da0| 74 68 65 0d 23 20 20 20 | 63 75 72 72 65 6e 74 20 |the.# |current |
|00000db0| 70 6f 72 74 20 74 6f 20 | 74 68 65 20 57 69 6e 64 |port to |the Wind|
|00000dc0| 6f 77 4d 67 72 2e 20 20 | 49 20 63 6f 75 6c 64 20 |owMgr. |I could |
|00000dd0| 68 61 76 65 20 75 73 65 | 64 20 6d 79 20 6f 77 6e |have use|d my own|
|00000de0| 20 77 69 6e 64 6f 77 2c | 20 62 75 74 0d 23 20 20 | window,| but.# |
|00000df0| 20 77 68 61 74 20 69 66 | 20 49 20 6e 65 65 64 65 | what if| I neede|
|00000e00| 64 20 74 68 65 20 66 6f | 6e 74 20 69 6e 66 6f 20 |d the fo|nt info |
|00000e10| 62 65 66 6f 72 65 20 49 | 20 68 61 64 20 61 20 77 |before I| had a w|
|00000e20| 69 6e 64 6f 77 20 61 76 | 61 69 6c 61 62 6c 65 3f |indow av|ailable?|
|00000e30| 0d 23 20 a5 20 54 68 65 | 20 74 6f 6f 6c 62 6f 78 |.# . The| toolbox|
|00000e40| 20 62 6c 6f 77 73 20 63 | 68 75 6e 6b 73 20 77 68 | blows c|hunks wh|
|00000e50| 65 6e 20 79 6f 75 72 20 | 68 65 61 70 20 67 65 74 |en your |heap get|
|00000e60| 73 20 d2 74 6f 6f 20 6c | 6f 77 2e d3 20 20 49 20 |s .too l|ow.. I |
|00000e70| 62 65 6c 69 65 76 65 0d | 23 20 20 20 74 68 69 73 |believe.|# this|
|00000e80| 20 6d 61 67 69 63 61 6c | 20 6e 75 6d 62 65 72 20 | magical| number |
|00000e90| 69 73 20 62 65 74 77 65 | 65 6e 20 33 32 6b 20 61 |is betwe|en 32k a|
|00000ea0| 6e 64 20 7a 65 72 6f 2e | 20 20 54 68 65 20 6f 64 |nd zero.| The od|
|00000eb0| 64 73 20 6f 66 20 62 6c | 6f 77 69 6e 67 0d 23 20 |ds of bl|owing.# |
|00000ec0| 20 20 63 68 75 6e 6b 73 | 20 69 6e 63 72 65 61 73 | chunks| increas|
|00000ed0| 65 20 6c 6f 67 61 72 69 | 74 68 6d 69 63 61 6c 6c |e logari|thmicall|
|00000ee0| 79 20 61 73 20 6f 6e 65 | 20 61 70 70 72 6f 61 63 |y as one| approac|
|00000ef0| 68 65 73 20 30 20 66 72 | 65 65 20 62 79 74 65 73 |hes 0 fr|ee bytes|
|00000f00| 2e 0d 23 20 a5 20 54 68 | 65 20 44 69 61 6c 6f 67 |..# . Th|e Dialog|
|00000f10| 20 4d 61 6e 61 67 65 72 | 20 69 73 20 6e 6f 74 20 | Manager| is not |
|00000f20| 61 20 66 72 65 65 20 6c | 75 6e 63 68 20 61 6e 64 |a free l|unch and|
|00000f30| 20 69 6e 20 66 61 63 74 | 20 77 69 6c 6c 20 63 6f | in fact| will co|
|00000f40| 73 74 20 79 6f 75 0d 23 | 20 20 20 70 6c 65 6e 74 |st you.#| plent|
|00000f50| 79 2e 0d 23 20 a5 20 54 | 68 65 72 65 d5 73 20 6e |y..# . T|here.s n|
|00000f60| 6f 20 73 61 66 65 20 77 | 61 79 20 74 6f 20 64 65 |o safe w|ay to de|
|00000f70| 74 65 72 6d 69 6e 65 20 | 68 6f 77 20 6d 75 63 68 |termine |how much|
|00000f80| 20 6d 65 6d 6f 72 79 20 | 6f 70 65 6e 69 6e 67 20 | memory |opening |
|00000f90| 61 0d 23 20 20 20 72 65 | 73 6f 75 72 63 65 20 66 |a.# re|source f|
|00000fa0| 69 6c 65 20 77 69 6c 6c | 20 74 61 6b 65 20 61 77 |ile will| take aw|
|00000fb0| 61 79 20 66 72 6f 6d 20 | 79 6f 75 72 20 68 65 61 |ay from |your hea|
|00000fc0| 70 2e 0d 23 20 a5 20 54 | 68 65 72 65 d5 73 20 6e |p..# . T|here.s n|
|00000fd0| 6f 20 77 61 79 20 74 6f | 20 64 65 74 65 72 6d 69 |o way to| determi|
|00000fe0| 6e 65 20 68 6f 77 20 73 | 61 66 65 20 69 74 20 69 |ne how s|afe it i|
|00000ff0| 73 20 6f 70 65 6e 69 6e | 67 20 61 20 72 65 73 6f |s openin|g a reso|
|00001000| 75 72 63 65 20 74 68 61 | 74 0d 23 20 20 20 63 6f |urce tha|t.# co|
|00001010| 75 6c 64 20 62 65 20 73 | 68 61 72 65 64 20 62 79 |uld be s|hared by|
|00001020| 20 6f 74 68 65 72 20 61 | 70 70 6c 69 63 61 74 69 | other a|pplicati|
|00001030| 6f 6e 73 2c 20 65 73 70 | 65 63 69 61 6c 6c 79 20 |ons, esp|ecially |
|00001040| 6f 6e 20 61 20 6c 6f 63 | 61 6c 20 76 6f 6c 75 6d |on a loc|al volum|
|00001050| 65 2e 0d 23 20 a5 20 54 | 68 65 20 52 65 73 6f 75 |e..# . T|he Resou|
|00001060| 72 63 65 20 4d 61 6e 61 | 67 65 72 20 64 6f 65 73 |rce Mana|ger does|
|00001070| 6e d5 74 20 61 6c 77 61 | 79 73 20 73 65 74 20 52 |n.t alwa|ys set R|
|00001080| 65 73 45 72 72 2e 0d 23 | 20 a5 20 54 68 65 20 53 |esErr..#| . The S|
|00001090| 6f 75 6e 64 20 4d 61 6e | 61 67 65 72 20 72 65 74 |ound Man|ager ret|
|000010a0| 75 72 6e 73 20 65 76 65 | 6e 20 6c 65 73 73 20 65 |urns eve|n less e|
|000010b0| 72 72 6f 72 73 2e 0d 23 | 20 a5 20 54 68 65 20 4c |rrors..#| . The L|
|000010c0| 69 73 74 20 4d 61 6e 61 | 67 65 72 20 72 65 74 75 |ist Mana|ger retu|
|000010d0| 72 6e 73 20 6e 6f 20 65 | 72 72 6f 72 73 2e 0d 23 |rns no e|rrors..#|
|000010e0| 20 a5 20 57 72 69 74 69 | 6e 67 20 61 20 73 74 61 | . Writi|ng a sta|
|000010f0| 67 67 65 72 69 6e 67 20 | 72 6f 75 74 69 6e 65 20 |ggering |routine |
|00001100| 66 6f 72 20 6e 65 77 20 | 77 69 6e 64 6f 77 73 20 |for new |windows |
|00001110| 65 6e 63 6f 6d 70 61 73 | 73 65 73 20 61 20 6e 75 |encompas|ses a nu|
|00001120| 6d 62 65 72 0d 23 20 20 | 20 6f 66 20 64 69 66 66 |mber.# | of diff|
|00001130| 69 63 75 6c 74 69 65 73 | 2e 20 20 48 6f 77 20 64 |iculties|. How d|
|00001140| 6f 65 73 20 6f 6e 65 20 | 66 69 6e 64 20 74 68 65 |oes one |find the|
|00001150| 20 68 65 69 67 68 74 20 | 6f 66 20 61 20 77 69 6e | height |of a win|
|00001160| 64 6f 77 d5 73 20 74 69 | 74 6c 65 0d 23 20 20 20 |dow.s ti|tle.# |
|00001170| 72 65 67 69 6f 6e 20 62 | 65 66 6f 72 65 20 74 68 |region b|efore th|
|00001180| 65 20 77 69 6e 64 6f 77 | 20 69 73 20 76 69 73 69 |e window| is visi|
|00001190| 62 6c 65 3f 0d 23 0d 23 | 20 41 6d 20 49 20 6a 75 |ble?.#.#| Am I ju|
|000011a0| 73 74 20 61 20 63 6f 6d | 70 6c 61 69 6e 65 72 3f |st a com|plainer?|
|000011b0| 20 20 44 6f 20 49 20 68 | 61 76 65 20 61 20 62 61 | Do I h|ave a ba|
|000011c0| 64 20 61 74 74 69 74 75 | 64 65 3f 20 20 50 72 6f |d attitu|de? Pro|
|000011d0| 62 61 62 6c 79 2c 20 62 | 75 74 0d 23 20 49 d5 6d |bably, b|ut.# I.m|
|000011e0| 20 6a 75 73 74 20 74 72 | 79 69 6e 67 20 74 6f 20 | just tr|ying to |
|000011f0| 70 6f 69 6e 74 20 6f 75 | 74 20 74 68 65 20 61 62 |point ou|t the ab|
|00001200| 6f 76 65 20 61 72 65 61 | 73 20 6d 61 6b 65 20 74 |ove area|s make t|
|00001210| 68 65 20 4d 61 63 20 70 | 72 6f 67 72 61 6d 6d 69 |he Mac p|rogrammi|
|00001220| 6e 67 0d 23 20 65 78 70 | 65 72 69 65 6e 63 65 20 |ng.# exp|erience |
|00001230| 64 69 66 66 69 63 75 6c | 74 2e 20 20 54 68 65 73 |difficul|t. Thes|
|00001240| 65 20 61 72 65 20 61 72 | 65 61 73 20 74 68 61 74 |e are ar|eas that|
|00001250| 20 67 65 74 20 64 65 76 | 65 6c 6f 70 65 72 73 20 | get dev|elopers |
|00001260| 69 6e 74 6f 0d 23 20 74 | 72 6f 75 62 6c 65 2e 20 |into.# t|rouble. |
|00001270| 20 54 68 65 73 65 20 61 | 72 65 61 73 20 6e 65 65 | These a|reas nee|
|00001280| 64 20 61 20 73 69 67 6e | 20 69 6e 20 66 72 6f 6e |d a sign| in fron|
|00001290| 74 20 6f 66 20 74 68 65 | 6d 20 74 68 61 74 20 73 |t of the|m that s|
|000012a0| 61 79 73 2c 0d 23 20 d2 | 44 61 6e 67 65 72 21 d3 |ays,.# .|Danger!.|
|000012b0| 20 20 54 68 65 73 65 20 | 61 72 65 20 61 72 65 61 | These |are area|
|000012c0| 73 20 74 68 61 74 20 64 | 65 76 65 6c 6f 70 65 72 |s that d|eveloper|
|000012d0| 73 20 67 65 74 20 69 6e | 74 6f 20 61 6e 64 20 74 |s get in|to and t|
|000012e0| 68 65 6e 20 77 72 69 74 | 65 20 74 6f 0d 23 20 4d |hen writ|e to.# M|
|000012f0| 61 63 44 54 53 20 66 6f | 72 20 68 65 6c 70 2e 0d |acDTS fo|r help..|
|00001300| 23 0d 23 20 4e 6f 74 61 | 74 69 6f 6e 20 43 6f 6e |#.# Nota|tion Con|
|00001310| 76 65 6e 74 69 6f 6e 73 | 0d 23 20 2d 2d 2d 2d 2d |ventions|.# -----|
|00001320| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00001330| 23 20 41 6c 6c 20 50 61 | 73 63 61 6c 20 72 65 73 |# All Pa|scal res|
|00001340| 65 72 76 65 64 20 77 6f | 72 64 73 20 61 72 65 20 |erved wo|rds are |
|00001350| 69 6e 20 75 70 70 65 72 | 20 63 61 73 65 2e 20 20 |in upper| case. |
|00001360| 41 6c 6c 20 67 6c 6f 62 | 61 6c 20 76 61 72 69 61 |All glob|al varia|
|00001370| 62 6c 65 73 0d 23 20 62 | 65 67 69 6e 20 77 69 74 |bles.# b|egin wit|
|00001380| 68 20 61 20 6c 6f 77 65 | 72 20 63 61 73 65 20 d2 |h a lowe|r case .|
|00001390| 67 d3 2e 20 41 6c 6c 20 | 63 6f 6e 73 74 61 6e 74 |g.. All |constant|
|000013a0| 73 20 62 65 67 69 6e 20 | 77 69 74 68 20 d2 6b d3 |s begin |with .k.|
|000013b0| 20 65 78 63 65 70 74 20 | 66 6f 72 0d 23 20 74 68 | except |for.# th|
|000013c0| 6f 73 65 20 6e 6f 74 65 | 64 20 68 65 72 65 2e 20 |ose note|d here. |
|000013d0| 20 52 65 73 6f 75 72 63 | 65 20 49 44 73 20 62 65 | Resourc|e IDs be|
|000013e0| 67 69 6e 20 77 69 74 68 | 20 d2 72 d3 2e 20 20 4d |gin with| .r.. M|
|000013f0| 65 6e 75 20 49 44 73 20 | 62 65 69 6e 67 20 77 69 |enu IDs |being wi|
|00001400| 74 68 0d 23 20 d2 6d d3 | 20 61 6e 64 20 69 74 65 |th.# .m.| and ite|
|00001410| 6d 73 20 77 69 74 68 20 | 61 6e 20 d2 69 d3 2e 20 |ms with |an .i.. |
|00001420| 20 52 65 73 6f 75 72 63 | 65 20 73 74 72 69 6e 67 | Resourc|e string|
|00001430| 73 20 62 65 67 69 6e 20 | 77 69 74 68 20 d2 73 d3 |s begin |with .s.|
|00001440| 2e 0d 23 0d 23 20 48 75 | 6d 61 6e 20 49 6e 74 65 |..#.# Hu|man Inte|
|00001450| 72 66 61 63 65 0d 23 20 | 2d 2d 2d 2d 2d 2d 2d 2d |rface.# |--------|
|00001460| 2d 2d 2d 2d 2d 2d 2d 0d | 23 20 54 68 69 73 20 69 |-------.|# This i|
|00001470| 73 20 74 68 65 20 6d 6f | 73 74 20 69 6d 70 6f 72 |s the mo|st impor|
|00001480| 74 61 6e 74 20 61 6e 64 | 20 61 62 6f 75 74 20 74 |tant and| about t|
|00001490| 68 65 20 6d 6f 73 74 20 | 64 69 66 66 69 63 75 6c |he most |difficul|
|000014a0| 74 20 61 73 70 65 63 74 | 20 6f 66 0d 23 20 70 72 |t aspect| of.# pr|
|000014b0| 6f 67 72 61 6d 6d 69 6e | 67 20 6f 6e 20 74 68 65 |ogrammin|g on the|
|000014c0| 20 4d 61 63 69 6e 74 6f | 73 68 2e 20 20 49 6e 20 | Macinto|sh. In |
|000014d0| 74 68 65 20 64 65 76 65 | 6c 6f 70 6d 65 6e 74 20 |the deve|lopment |
|000014e0| 6f 66 20 53 6f 75 6e 64 | 41 70 70 20 49 20 67 61 |of Sound|App I ga|
|000014f0| 76 65 20 6d 75 63 68 0d | 23 20 74 68 6f 75 67 68 |ve much.|# though|
|00001500| 74 20 74 6f 20 74 68 65 | 20 68 75 6d 61 6e 20 69 |t to the| human i|
|00001510| 6e 74 65 72 66 61 63 65 | 20 69 73 73 75 65 73 2e |nterface| issues.|
|00001520| 20 20 49 6e 20 66 61 63 | 74 2c 20 69 6e 20 74 61 | In fac|t, in ta|
|00001530| 6c 6b 69 6e 67 20 77 69 | 74 68 20 74 68 65 20 48 |lking wi|th the H|
|00001540| 75 6d 61 6e 0d 23 20 49 | 6e 74 65 72 66 61 63 65 |uman.# I|nterface|
|00001550| 20 47 72 6f 75 70 20 61 | 64 64 69 74 69 6f 6e 73 | Group a|dditions|
|00001560| 20 74 6f 20 74 68 65 20 | 65 78 69 73 74 69 6e 67 | to the |existing|
|00001570| 20 67 75 69 64 65 6c 69 | 6e 65 73 20 77 65 72 65 | guideli|nes were|
|00001580| 20 6d 61 64 65 2e 20 20 | 54 68 65 0d 23 20 6d 65 | made. |The.# me|
|00001590| 74 68 6f 64 20 6f 66 20 | 77 69 6e 64 6f 77 20 73 |thod of |window s|
|000015a0| 74 61 63 6b 69 6e 67 20 | 75 73 65 64 20 68 65 72 |tacking |used her|
|000015b0| 65 20 77 61 73 20 61 20 | 6e 65 77 20 6f 6e 65 2e |e was a |new one.|
|000015c0| 20 20 54 68 69 73 20 77 | 61 73 20 64 6f 63 75 6d | This w|as docum|
|000015d0| 65 6e 74 65 64 20 69 6e | 0d 23 20 61 20 48 75 6d |ented in|.# a Hum|
|000015e0| 61 6e 20 49 6e 74 65 72 | 66 61 63 65 20 54 65 63 |an Inter|face Tec|
|000015f0| 68 20 4e 6f 74 65 2e 20 | 20 49 20 65 76 65 6e 20 |h Note. | I even |
|00001600| 6d 61 64 65 20 6f 6e 65 | 20 63 6f 6d 70 72 6f 6d |made one| comprom|
|00001610| 69 73 65 20 28 68 61 72 | 64 20 74 6f 0d 23 20 62 |ise (har|d to.# b|
|00001620| 65 6c 69 65 76 65 21 29 | 20 73 75 67 67 65 73 74 |elieve!)| suggest|
|00001630| 65 64 20 62 79 20 74 68 | 65 20 48 75 6d 61 6e 20 |ed by th|e Human |
|00001640| 49 6e 74 65 72 66 61 63 | 65 20 47 72 6f 75 70 2e |Interfac|e Group.|
|00001650| 20 20 49 20 6f 72 69 67 | 69 6e 61 6c 6c 79 20 68 | I orig|inally h|
|00001660| 61 64 20 74 68 65 0d 23 | 20 62 75 74 74 6f 6e 73 |ad the.#| buttons|
|00001670| 20 61 6e 64 20 74 68 65 | 20 6c 69 73 74 20 69 6e | and the| list in|
|00001680| 20 6d 79 20 63 68 6f 69 | 63 65 20 6f 66 20 66 6f | my choi|ce of fo|
|00001690| 6e 74 20 61 6e 64 20 73 | 69 7a 65 2e 20 20 54 68 |nt and s|ize. Th|
|000016a0| 65 79 20 66 65 6c 74 20 | 74 68 61 74 0d 23 20 62 |ey felt |that.# b|
|000016b0| 75 74 74 6f 6e 73 20 73 | 68 6f 75 6c 64 20 62 65 |uttons s|hould be|
|000016c0| 20 69 6e 20 74 68 65 20 | 53 79 73 74 65 6d 20 66 | in the |System f|
|000016d0| 6f 6e 74 20 61 6e 64 20 | 74 68 65 20 6c 69 73 74 |ont and |the list|
|000016e0| 20 73 68 6f 75 6c 64 20 | 61 6c 73 6f 20 62 65 20 | should |also be |
|000016f0| 74 68 65 20 73 61 6d 65 | 2e 0d 23 20 49 20 6c 69 |the same|..# I li|
|00001700| 6b 65 64 20 6d 79 20 66 | 6f 6e 74 20 63 68 6f 69 |ked my f|ont choi|
|00001710| 63 65 20 62 65 74 74 65 | 72 2c 20 62 75 74 20 74 |ce bette|r, but t|
|00001720| 68 65 20 67 72 6f 75 70 | 20 68 61 64 20 61 20 70 |he group| had a p|
|00001730| 6f 69 6e 74 20 74 68 61 | 74 20 49 20 72 65 61 6c |oint tha|t I real|
|00001740| 6c 79 0d 23 20 63 6f 75 | 6c 64 6e d5 74 20 61 72 |ly.# cou|ldn.t ar|
|00001750| 67 75 65 20 77 69 74 68 | 2e 20 20 54 68 61 74 20 |gue with|. That |
|00001760| 77 61 73 2c 20 d2 49 66 | 20 74 68 65 72 65 20 69 |was, .If| there i|
|00001770| 73 6e d5 74 20 61 20 63 | 6f 6d 70 65 6c 6c 69 6e |sn.t a c|ompellin|
|00001780| 67 20 72 65 61 73 6f 6e | 20 74 6f 0d 23 20 63 68 |g reason| to.# ch|
|00001790| 61 6e 67 65 20 73 6f 6d | 65 74 68 69 6e 67 20 73 |ange som|ething s|
|000017a0| 74 61 6e 64 61 72 64 2c | 20 74 68 65 6e 20 64 6f |tandard,| then do|
|000017b0| 6e d5 74 20 63 68 61 6e | 67 65 20 69 74 2e d3 20 |n.t chan|ge it.. |
|000017c0| 20 42 75 74 74 6f 6e 73 | 20 6f 6e 20 61 20 4d 61 | Buttons| on a Ma|
|000017d0| 63 69 6e 74 6f 73 68 0d | 23 20 74 79 70 69 63 61 |cintosh.|# typica|
|000017e0| 6c 6c 79 20 61 70 70 65 | 61 72 20 69 6e 20 74 68 |lly appe|ar in th|
|000017f0| 65 20 53 79 73 74 65 6d | 20 66 6f 6e 74 2e 20 20 |e System| font. |
|00001800| 43 68 61 6e 67 69 6e 67 | 20 74 68 65 20 66 6f 6e |Changing| the fon|
|00001810| 74 2c 20 6a 75 73 74 20 | 62 65 63 61 75 73 65 20 |t, just |because |
|00001820| 49 0d 23 20 77 61 6e 74 | 65 64 20 74 6f 2c 20 77 |I.# want|ed to, w|
|00001830| 61 73 20 63 6f 6e 73 69 | 64 65 72 65 64 20 67 72 |as consi|dered gr|
|00001840| 61 74 75 69 74 6f 75 73 | 2e 20 20 53 74 61 6e 64 |atuitous|. Stand|
|00001850| 61 72 64 20 46 69 6c 65 | 20 69 73 20 69 6e 20 74 |ard File| is in t|
|00001860| 68 65 20 53 79 73 74 65 | 6d 20 66 6f 6e 74 0d 23 |he Syste|m font.#|
|00001870| 20 61 6e 64 20 69 74 20 | 61 6c 73 6f 20 63 6f 6e | and it |also con|
|00001880| 74 61 69 6e 73 20 61 20 | 6c 69 73 74 20 61 6e 64 |tains a |list and|
|00001890| 20 62 75 74 74 6f 6e 73 | 2e 20 20 53 69 6e 63 65 | buttons|. Since|
|000018a0| 20 6d 79 20 77 69 6e 64 | 6f 77 20 61 72 65 20 76 | my wind|ow are v|
|000018b0| 65 72 79 20 73 69 6d 69 | 6c 61 72 0d 23 20 74 6f |ery simi|lar.# to|
|000018c0| 20 74 68 61 74 20 64 69 | 61 6c 6f 67 2c 20 49 d5 | that di|alog, I.|
|000018d0| 6d 20 75 73 69 6e 67 20 | 74 68 65 20 53 79 73 74 |m using |the Syst|
|000018e0| 65 6d 20 46 6f 6e 74 2e | 0d 23 0d 23 20 53 6f 75 |em Font.|.#.# Sou|
|000018f0| 6e 64 41 70 70 20 69 73 | 20 6e 65 76 65 72 20 6d |ndApp is| never m|
|00001900| 6f 64 61 6c 20 75 6e 6c | 65 73 73 20 61 6e 20 65 |odal unl|ess an e|
|00001910| 72 72 6f 72 20 6f 63 63 | 75 72 73 20 61 6e 64 20 |rror occ|urs and |
|00001920| 49 20 6e 65 65 64 20 74 | 6f 20 73 68 6f 77 20 61 |I need t|o show a|
|00001930| 6e 64 0d 23 20 61 6c 65 | 72 74 2e 20 20 43 6f 6e |nd.# ale|rt. Con|
|00001940| 74 72 6f 6c 73 20 61 72 | 65 20 69 6e 61 63 74 69 |trols ar|e inacti|
|00001950| 76 61 74 65 64 20 66 6f | 72 20 69 6e 61 63 74 69 |vated fo|r inacti|
|00001960| 76 65 20 77 69 6e 64 6f | 77 73 2e 20 20 54 68 65 |ve windo|ws. The|
|00001970| 20 64 65 66 61 75 6c 74 | 20 62 75 74 74 6f 6e 0d | default| button.|
|00001980| 23 20 69 73 20 67 69 76 | 65 6e 20 74 68 65 20 70 |# is giv|en the p|
|00001990| 72 6f 70 65 72 20 6f 75 | 74 6c 69 6e 65 2c 20 61 |roper ou|tline, a|
|000019a0| 6e 64 20 74 68 69 73 20 | 6f 75 74 6c 69 6e 65 20 |nd this |outline |
|000019b0| 64 69 73 61 70 70 65 61 | 72 73 20 77 68 65 6e 20 |disappea|rs when |
|000019c0| 74 68 65 20 77 69 6e 64 | 6f 77 0d 23 20 69 73 20 |the wind|ow.# is |
|000019d0| 64 65 61 63 74 69 76 61 | 74 65 64 2e 20 20 4b 65 |deactiva|ted. Ke|
|000019e0| 79 62 6f 61 72 64 20 65 | 71 75 69 76 61 6c 65 6e |yboard e|quivalen|
|000019f0| 74 73 20 66 6f 72 20 74 | 68 65 20 62 75 74 74 6f |ts for t|he butto|
|00001a00| 6e 73 20 63 61 75 73 65 | 20 74 68 65 20 62 75 74 |ns cause| the but|
|00001a10| 74 6f 6e 20 74 6f 0d 23 | 20 61 70 70 65 61 72 20 |ton to.#| appear |
|00001a20| 61 73 20 69 66 20 69 74 | 20 68 61 64 20 62 65 65 |as if it| had bee|
|00001a30| 6e 20 63 6c 69 63 6b 65 | 64 20 69 6e 2e 20 20 54 |n clicke|d in. T|
|00001a40| 68 65 20 63 68 65 63 6b | 20 62 6f 78 20 69 6e 20 |he check| box in |
|00001a50| 74 68 65 20 53 74 61 6e | 64 61 72 64 20 46 69 6c |the Stan|dard Fil|
|00001a60| 65 0d 23 20 64 69 61 6c | 6f 67 20 72 65 6d 65 6d |e.# dial|og remem|
|00001a70| 62 65 72 73 20 74 68 65 | 20 75 73 65 72 d5 73 20 |bers the| user.s |
|00001a80| 6c 61 73 74 20 73 65 74 | 74 69 6e 67 2e 20 20 54 |last set|ting. T|
|00001a90| 68 65 20 61 62 6f 75 74 | 20 62 6f 78 20 69 73 20 |he about| box is |
|00001aa0| 6f 6e 6c 79 0d 23 20 73 | 65 6d 69 2d 6d 6f 64 61 |only.# s|emi-moda|
|00001ab0| 6c 2e 20 20 49 74 20 77 | 69 6c 6c 20 61 6c 6c 6f |l. It w|ill allo|
|00001ac0| 77 20 74 68 65 20 75 73 | 65 72 20 61 63 63 65 73 |w the us|er acces|
|00001ad0| 73 20 74 6f 20 73 77 69 | 74 63 68 20 74 6f 20 61 |s to swi|tch to a|
|00001ae0| 6e 6f 74 68 65 72 20 61 | 70 70 6c 69 63 61 74 69 |nother a|pplicati|
|00001af0| 6f 6e 2e 0d 23 20 54 68 | 65 20 73 74 61 74 75 73 |on..# Th|e status|
|00001b00| 20 77 69 6e 64 6f 77 20 | 75 6e 64 65 72 20 73 6f | window |under so|
|00001b10| 6d 65 20 63 69 72 63 75 | 6d 73 74 61 6e 63 65 73 |me circu|mstances|
|00001b20| 20 77 61 73 20 66 6f 75 | 6e 64 20 74 6f 20 64 69 | was fou|nd to di|
|00001b30| 73 61 70 70 65 61 72 20 | 74 6f 6f 20 71 75 69 63 |sappear |too quic|
|00001b40| 6b 6c 79 2c 0d 23 20 73 | 6f 20 61 20 62 75 69 6c |kly,.# s|o a buil|
|00001b50| 74 20 69 6e 20 64 65 6c | 61 79 20 77 61 73 20 61 |t in del|ay was a|
|00001b60| 64 64 65 64 2e 20 20 57 | 69 6e 64 6f 77 73 20 61 |dded. W|indows a|
|00001b70| 72 65 20 63 65 6e 74 65 | 72 65 64 20 6f 72 20 73 |re cente|red or s|
|00001b80| 74 61 63 6b 65 64 20 61 | 63 63 6f 72 64 69 6e 67 |tacked a|ccording|
|00001b90| 0d 23 20 74 6f 20 74 68 | 65 20 48 75 6d 61 6e 20 |.# to th|e Human |
|00001ba0| 49 6e 74 65 72 66 61 63 | 65 20 47 75 69 64 65 6c |Interfac|e Guidel|
|00001bb0| 69 6e 65 73 2e 20 20 54 | 68 65 20 73 6f 75 6e 64 |ines. T|he sound|
|00001bc0| 20 6c 65 76 65 6c 20 69 | 73 6e d5 74 20 61 64 6a | level i|sn.t adj|
|00001bd0| 75 73 74 65 64 20 62 79 | 20 74 68 65 0d 23 20 61 |usted by| the.# a|
|00001be0| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 61 6e 64 20 |pplicati|on, and |
|00001bf0| 69 6e 73 74 65 61 64 20 | 74 68 65 20 75 73 65 72 |instead |the user|
|00001c00| 73 20 69 73 20 69 6e 66 | 6f 72 6d 65 64 20 6f 66 |s is inf|ormed of|
|00001c10| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6c 65 76 | the cur|rent lev|
|00001c20| 65 6c 20 61 6e 64 0d 23 | 20 74 6f 6c 64 20 68 6f |el and.#| told ho|
|00001c30| 77 20 69 74 20 63 61 6e | 20 62 65 20 61 64 6a 75 |w it can| be adju|
|00001c40| 73 74 65 64 2e 0d 23 0d | 23 20 54 68 65 20 41 62 |sted..#.|# The Ab|
|00001c50| 6f 75 74 20 62 6f 78 0d | 23 20 2d 2d 2d 2d 2d 2d |out box.|# ------|
|00001c60| 2d 2d 2d 2d 2d 2d 2d 0d | 23 20 49 74 d5 73 20 72 |-------.|# It.s r|
|00001c70| 61 64 2e 20 20 48 61 73 | 20 61 20 63 6f 6c 6f 72 |ad. Has| a color|
|00001c80| 20 69 63 6f 6e 2c 20 73 | 68 6f 77 73 20 74 68 65 | icon, s|hows the|
|00001c90| 20 27 76 65 72 73 27 20 | 72 65 73 6f 75 72 63 65 | 'vers' |resource|
|00001ca0| 2c 20 67 6f 65 73 20 4d | 6f 6f 66 21 aa 2e 20 20 |, goes M|oof!.. |
|00001cb0| 49 74 0d 23 20 61 6c 73 | 6f 20 64 65 6d 6f 6e 73 |It.# als|o demons|
|00001cc0| 74 72 61 74 65 73 20 68 | 6f 77 20 74 6f 20 68 61 |trates h|ow to ha|
|00001cd0| 6e 64 6c 65 20 61 20 6d | 6f 64 61 6c 20 77 69 6e |ndle a m|odal win|
|00001ce0| 64 6f 77 20 77 69 74 68 | 6f 75 74 20 74 68 65 20 |dow with|out the |
|00001cf0| 44 69 61 6c 6f 67 20 4d | 61 6e 61 67 65 72 2e 0d |Dialog M|anager..|
|00001d00| 23 20 54 68 69 73 20 74 | 65 63 68 6e 69 71 75 65 |# This t|echnique|
|00001d10| 20 63 61 6e 20 62 65 20 | 75 73 65 20 66 6f 72 20 | can be |use for |
|00001d20| 61 6e 79 20 77 69 6e 64 | 6f 77 2c 20 69 6e 63 6c |any wind|ow, incl|
|00001d30| 75 64 69 6e 67 20 64 69 | 61 6c 6f 67 20 77 69 6e |uding di|alog win|
|00001d40| 64 6f 77 73 2e 20 20 54 | 68 65 0d 23 20 64 69 61 |dows. T|he.# dia|
|00001d50| 6c 6f 67 d5 73 20 75 70 | 64 61 74 65 20 72 6f 75 |log.s up|date rou|
|00001d60| 74 69 6e 65 20 77 6f 75 | 6c 64 20 63 61 6c 6c 20 |tine wou|ld call |
|00001d70| 55 70 64 74 44 69 61 6c | 6f 67 2e 20 20 54 68 65 |UpdtDial|og. The|
|00001d80| 20 72 65 61 6c 6c 79 20 | 6e 65 77 20 70 6f 69 6e | really |new poin|
|00001d90| 74 20 74 6f 0d 23 20 6e | 6f 74 69 63 65 20 69 73 |t to.# n|otice is|
|00001da0| 20 74 68 69 73 20 77 69 | 6e 64 6f 77 20 69 73 20 | this wi|ndow is |
|00001db0| 6d 6f 64 61 6c 20 62 75 | 74 20 4f 4e 4c 59 20 77 |modal bu|t ONLY w|
|00001dc0| 69 74 68 69 6e 20 74 68 | 65 20 61 70 70 6c 69 63 |ithin th|e applic|
|00001dd0| 61 74 69 6f 6e d5 73 20 | 6c 61 79 65 72 2e 0d 23 |ation.s |layer..#|
|00001de0| 20 57 68 69 6c 65 20 72 | 75 6e 6e 69 6e 67 20 75 | While r|unning u|
|00001df0| 6e 64 65 72 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |nder Mul|tiFinder|
|00001e00| 2c 20 74 68 65 20 75 73 | 65 72 20 63 61 6e 20 73 |, the us|er can s|
|00001e10| 77 69 74 63 68 20 74 6f | 20 6f 74 68 65 72 0d 23 |witch to| other.#|
|00001e20| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 2e 20 20 | applica|tions. |
|00001e30| 57 68 69 6c 65 20 74 68 | 65 20 41 62 6f 75 74 20 |While th|e About |
|00001e40| 77 69 6e 64 6f 77 20 69 | 73 20 70 72 65 73 65 6e |window i|s presen|
|00001e50| 74 2c 20 69 74 20 69 73 | 20 74 68 65 20 6f 6e 6c |t, it is| the onl|
|00001e60| 79 20 77 69 6e 64 6f 77 | 0d 23 20 62 65 6c 6f 6e |y window|.# belon|
|00001e70| 67 69 6e 67 20 74 6f 20 | 74 68 65 20 61 70 70 6c |ging to |the appl|
|00001e80| 69 63 61 74 69 6f 6e 20 | 74 68 61 74 20 61 63 63 |ication |that acc|
|00001e90| 65 70 74 73 20 75 73 65 | 72 20 61 63 74 69 6f 6e |epts use|r action|
|00001ea0| 73 2e 0d 23 0d 23 20 4d | 65 6d 6f 72 79 20 4d 61 |s..#.# M|emory Ma|
|00001eb0| 6e 61 67 65 6d 65 6e 74 | 0d 23 20 2d 2d 2d 2d 2d |nagement|.# -----|
|00001ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 23 20 54 68 |--------|---.# Th|
|00001ed0| 69 73 20 68 61 73 20 74 | 6f 20 62 65 20 74 68 65 |is has t|o be the|
|00001ee0| 20 6d 6f 73 74 20 64 69 | 66 66 69 63 75 6c 74 20 | most di|fficult |
|00001ef0| 70 6f 72 74 69 6f 6e 20 | 6f 66 20 61 20 4d 61 63 |portion |of a Mac|
|00001f00| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 6f 0d | applica|tion to.|
|00001f10| 23 20 77 72 69 74 65 2e | 20 20 54 68 69 73 20 61 |# write.| This a|
|00001f20| 6c 6f 6e 67 20 77 69 74 | 68 20 74 68 65 20 75 73 |long wit|h the us|
|00001f30| 65 72 20 69 6e 74 65 72 | 66 61 63 65 2e 20 20 49 |er inter|face. I|
|00001f40| 20 73 70 65 6e 74 20 74 | 6f 6f 20 6d 61 6e 79 20 | spent t|oo many |
|00001f50| 6e 69 67 68 74 73 0d 23 | 20 63 68 61 73 69 6e 67 |nights.#| chasing|
|00001f60| 20 64 6f 77 6e 20 63 72 | 61 73 68 65 73 20 77 68 | down cr|ashes wh|
|00001f70| 69 6c 65 20 72 75 6e 6e | 69 6e 67 20 74 68 65 20 |ile runn|ing the |
|00001f80| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 75 6e 64 65 |applicat|ion unde|
|00001f90| 72 20 6c 6f 77 20 6d 65 | 6d 6f 72 79 2e 0d 23 20 |r low me|mory..# |
|00001fa0| 49 20 66 6f 75 6e 64 20 | 75 6e 70 6c 65 61 73 61 |I found |unpleasa|
|00001fb0| 6e 74 20 73 75 72 70 72 | 69 73 65 73 20 77 68 69 |nt surpr|ises whi|
|00001fc0| 6c 65 20 64 6f 69 6e 67 | 20 74 68 69 73 2e 20 20 |le doing| this. |
|00001fd0| 54 68 65 20 53 6f 75 6e | 64 20 4d 61 6e 61 67 65 |The Soun|d Manage|
|00001fe0| 72 0d 23 20 64 6f 65 73 | 6e d5 74 20 63 68 65 63 |r.# does|n.t chec|
|00001ff0| 6b 20 66 6f 72 20 4e 49 | 4c 20 70 6f 69 6e 74 65 |k for NI|L pointe|
|00002000| 72 73 2e 20 20 4f 70 65 | 6e 52 65 73 46 69 6c 65 |rs. Ope|nResFile|
|00002010| 20 6d 61 79 20 74 61 6b | 65 20 6c 61 72 67 65 20 | may tak|e large |
|00002020| 70 6f 72 74 69 6f 6e 73 | 0d 23 20 6f 66 20 6d 79 |portions|.# of my|
|00002030| 20 68 65 61 70 20 61 77 | 61 79 2e 20 20 54 68 65 | heap aw|ay. The|
|00002040| 20 74 6f 6f 6c 62 6f 78 | 20 73 65 65 6d 73 20 74 | toolbox| seems t|
|00002050| 6f 20 6e 65 65 64 20 61 | 74 20 6c 65 61 73 74 20 |o need a|t least |
|00002060| 33 32 6b 20 6f 66 20 66 | 72 65 65 20 73 70 61 63 |32k of f|ree spac|
|00002070| 65 0d 23 20 69 6e 20 74 | 68 65 20 68 65 61 70 20 |e.# in t|he heap |
|00002080| 6f 66 20 6d 79 20 4d 61 | 63 20 49 49 20 72 75 6e |of my Ma|c II run|
|00002090| 6e 69 6e 67 20 63 6f 6c | 6f 72 2e 0d 23 0d 23 20 |ning col|or..#.# |
|000020a0| 49 20 77 72 6f 74 65 20 | 61 20 73 69 6d 70 6c 65 |I wrote |a simple|
|000020b0| 20 67 72 6f 77 20 7a 6f | 6e 65 20 70 72 6f 63 65 | grow zo|ne proce|
|000020c0| 64 75 72 65 20 74 68 61 | 74 20 77 69 6c 6c 20 64 |dure tha|t will d|
|000020d0| 75 6d 70 20 61 20 72 65 | 73 65 72 76 65 20 6d 65 |ump a re|serve me|
|000020e0| 6d 6f 72 79 0d 23 20 62 | 6c 6f 63 6b 2e 20 20 54 |mory.# b|lock. T|
|000020f0| 68 69 73 20 69 73 20 6f | 6e 6c 79 20 63 6f 6e 73 |his is o|nly cons|
|00002100| 69 64 65 72 65 64 20 66 | 6f 72 20 75 73 65 20 69 |idered f|or use i|
|00002110| 6e 20 61 6e 20 65 6d 65 | 72 67 65 6e 63 79 2e 20 |n an eme|rgency. |
|00002120| 20 49 20 6e 65 76 65 72 | 20 72 65 6c 79 0d 23 20 | I never| rely.# |
|00002130| 6f 6e 20 75 73 69 6e 67 | 20 69 74 20 64 69 72 65 |on using| it dire|
|00002140| 63 74 6c 79 2e 20 20 49 | 66 20 74 68 65 20 72 65 |ctly. I|f the re|
|00002150| 73 65 72 76 65 20 68 61 | 73 20 62 65 65 6e 20 72 |serve ha|s been r|
|00002160| 65 6c 65 61 73 65 64 2c | 20 49 20 77 69 6c 6c 20 |eleased,| I will |
|00002170| 6e 6f 74 0d 23 20 63 6f | 6e 74 69 6e 75 65 20 61 |not.# co|ntinue a|
|00002180| 6e 20 6f 70 65 72 61 74 | 69 6f 6e 20 73 75 63 68 |n operat|ion such|
|00002190| 20 61 73 20 70 6c 61 79 | 69 6e 67 20 61 20 73 6f | as play|ing a so|
|000021a0| 75 6e 64 20 6f 72 20 73 | 68 6f 77 69 6e 67 20 74 |und or s|howing t|
|000021b0| 68 65 20 73 74 61 74 75 | 73 0d 23 20 77 69 6e 64 |he statu|s.# wind|
|000021c0| 6f 77 20 75 6e 74 69 6c | 20 69 74 20 69 73 20 72 |ow until| it is r|
|000021d0| 65 67 61 69 6e 65 64 2e | 20 20 47 72 6f 77 20 7a |egained.| Grow z|
|000021e0| 6f 6e 65 73 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 |ones sho|uld not |
|000021f0| 62 65 20 63 6f 6e 73 69 | 64 65 72 65 64 20 61 0d |be consi|dered a.|
|00002200| 23 20 73 6f 6c 75 74 69 | 6f 6e 20 74 6f 20 6d 65 |# soluti|on to me|
|00002210| 6d 6f 72 79 20 6d 61 6e | 61 67 65 6d 65 6e 74 2e |mory man|agement.|
|00002220| 20 20 54 68 65 79 20 63 | 61 6e 20 62 65 20 75 73 | They c|an be us|
|00002230| 65 64 20 74 6f 20 61 75 | 67 6d 65 6e 74 20 79 6f |ed to au|gment yo|
|00002240| 75 72 0d 23 20 6f 76 65 | 72 61 6c 6c 20 6d 65 6d |ur.# ove|rall mem|
|00002250| 6f 72 79 20 6d 61 6e 61 | 67 65 6d 65 6e 74 20 73 |ory mana|gement s|
|00002260| 63 68 65 6d 65 2e 0d 23 | 0d 23 20 45 72 72 6f 72 |cheme..#|.# Error|
|00002270| 20 43 68 65 63 6b 69 6e | 67 0d 23 20 2d 2d 2d 2d | Checkin|g.# ----|
|00002280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 23 20 4c 6f 74 |--------|--.# Lot|
|00002290| 73 20 61 6e 64 20 6c 6f | 74 73 20 61 6e 64 20 6c |s and lo|ts and l|
|000022a0| 6f 74 73 20 6f 66 20 69 | 74 2e 20 20 49 20 63 6f |ots of i|t. I co|
|000022b0| 75 6c 64 20 65 76 65 6e | 20 64 6f 20 6d 6f 72 65 |uld even| do more|
|000022c0| 2e 20 20 50 72 6f 67 72 | 61 6d 6d 65 72 73 0d 23 |. Progr|ammers.#|
|000022d0| 20 6e 65 65 64 20 74 6f | 20 64 6f 20 6d 6f 72 65 | need to| do more|
|000022e0| 20 6f 66 20 74 68 69 73 | 2e 20 20 54 68 65 20 53 | of this|. The S|
|000022f0| 6f 75 6e 64 20 4d 61 6e | 61 67 65 72 20 77 69 6c |ound Man|ager wil|
|00002300| 6c 20 63 72 61 73 68 20 | 77 68 65 6e 0d 23 20 65 |l crash |when.# e|
|00002310| 6e 63 6f 75 6e 74 65 72 | 69 6e 67 20 61 20 4e 49 |ncounter|ing a NI|
|00002320| 4c 20 70 6f 69 6e 74 65 | 72 2e 20 20 4d 79 20 61 |L pointe|r. My a|
|00002330| 70 70 6c 69 63 61 74 69 | 6f 6e 20 73 68 6f 75 6c |pplicati|on shoul|
|00002340| 64 20 6e 65 76 65 72 20 | 63 72 61 73 68 2e 20 20 |d never |crash. |
|00002350| 49 66 0d 23 20 79 6f 75 | 20 63 61 6e 20 66 69 6e |If.# you| can fin|
|00002360| 64 20 61 20 77 61 79 20 | 74 6f 20 63 72 61 73 68 |d a way |to crash|
|00002370| 20 74 68 69 73 20 61 70 | 70 6c 69 63 61 74 69 6f | this ap|plicatio|
|00002380| 6e 2c 20 74 68 65 6e 20 | 49 20 77 61 6e 74 20 74 |n, then |I want t|
|00002390| 6f 20 68 65 61 72 0d 23 | 20 61 62 6f 75 74 20 69 |o hear.#| about i|
|000023a0| 74 2e 20 20 55 73 69 6e | 67 20 61 20 62 6f 67 75 |t. Usin|g a bogu|
|000023b0| 73 20 27 73 6e 64 20 27 | 20 72 65 73 6f 75 72 63 |s 'snd '| resourc|
|000023c0| 65 73 20 64 6f 65 73 6e | d5 74 20 63 6f 75 6e 74 |es doesn|.t count|
|000023d0| 20 61 6e 64 20 49 d5 76 | 65 20 66 6f 75 6e 64 0d | and I.v|e found.|
|000023e0| 23 20 6d 61 6e 79 20 6f | 66 20 74 68 6f 73 65 2e |# many o|f those.|
|000023f0| 20 20 57 72 69 74 69 6e | 67 20 70 72 6f 70 65 72 | Writin|g proper|
|00002400| 20 65 72 72 6f 72 20 63 | 68 65 63 6b 69 6e 67 20 | error c|hecking |
|00002410| 69 6e 74 6f 20 74 68 65 | 20 63 6f 64 65 20 64 75 |into the| code du|
|00002420| 72 69 6e 67 0d 23 20 64 | 65 76 65 6c 6f 70 6d 65 |ring.# d|evelopme|
|00002430| 6e 74 20 72 65 61 6c 6c | 79 20 68 65 6c 70 65 64 |nt reall|y helped|
|00002440| 2e 20 20 41 6c 77 61 79 | 73 20 68 61 6e 64 6c 65 |. Alway|s handle|
|00002450| 20 65 72 72 6f 72 73 2c | 20 61 6e 64 20 70 61 73 | errors,| and pas|
|00002460| 73 20 61 6c 6f 6e 67 20 | 74 68 65 0d 23 20 65 72 |s along |the.# er|
|00002470| 72 6f 72 2e 20 20 49 20 | 77 69 6c 6c 20 6c 65 74 |ror. I |will let|
|00002480| 20 74 68 65 20 66 69 72 | 73 74 20 65 72 72 6f 72 | the fir|st error|
|00002490| 20 65 6e 63 6f 75 6e 74 | 65 72 65 64 20 74 6f 20 | encount|ered to |
|000024a0| 62 65 20 70 61 73 73 65 | 64 20 61 6c 6c 20 74 68 |be passe|d all th|
|000024b0| 65 0d 23 20 77 61 79 20 | 75 70 20 74 6f 20 74 68 |e.# way |up to th|
|000024c0| 65 20 63 61 6c 6c 65 72 | 20 61 6e 64 20 65 76 65 |e caller| and eve|
|000024d0| 6e 74 75 61 6c 6c 79 20 | 6d 79 20 65 72 72 6f 72 |ntually |my error|
|000024e0| 20 64 69 61 6c 6f 67 20 | 77 69 6c 6c 20 73 68 6f | dialog |will sho|
|000024f0| 77 20 75 70 20 66 6f 72 | 0d 23 20 74 68 65 20 75 |w up for|.# the u|
|00002500| 73 65 72 2e 0d 23 0d 23 | 20 53 65 74 50 6f 72 74 |ser..#.#| SetPort|
|00002510| 20 53 74 72 61 74 65 67 | 79 0d 23 20 2d 2d 2d 2d | Strateg|y.# ----|
|00002520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 23 20 41 |--------|----.# A|
|00002530| 6e 79 20 72 6f 75 74 69 | 6e 65 20 74 68 61 74 20 |ny routi|ne that |
|00002540| 6e 65 65 64 73 20 74 6f | 20 75 73 65 20 51 75 69 |needs to| use Qui|
|00002550| 63 6b 64 72 61 77 20 77 | 69 6c 6c 20 73 65 74 20 |ckdraw w|ill set |
|00002560| 74 68 65 20 70 6f 72 74 | 2e 20 20 49 20 64 6f 20 |the port|. I do |
|00002570| 6e 6f 74 0d 23 20 62 65 | 6c 69 65 76 65 20 74 68 |not.# be|lieve th|
|00002580| 61 74 20 69 74 20 73 68 | 6f 75 6c 64 20 61 6c 73 |at it sh|ould als|
|00002590| 6f 20 62 65 20 72 65 73 | 70 6f 6e 73 69 62 6c 65 |o be res|ponsible|
|000025a0| 20 66 6f 72 20 72 65 73 | 74 6f 72 69 6e 67 20 74 | for res|toring t|
|000025b0| 68 65 20 70 6f 72 74 20 | 62 61 63 6b 0d 23 20 74 |he port |back.# t|
|000025c0| 6f 20 77 68 61 74 20 69 | 74 20 6d 61 79 20 68 61 |o what i|t may ha|
|000025d0| 76 65 20 62 65 65 6e 20 | 62 65 66 6f 72 65 20 74 |ve been |before t|
|000025e0| 68 65 20 72 6f 75 74 69 | 6e 65 20 77 61 73 20 63 |he routi|ne was c|
|000025f0| 61 6c 6c 65 64 2e 20 20 | 53 6f 2c 20 79 6f 75 d5 |alled. |So, you.|
|00002600| 6c 6c 0d 23 20 66 69 6e | 64 20 74 68 65 72 65 20 |ll.# fin|d there |
|00002610| 69 73 20 61 6e 20 61 62 | 73 65 6e 63 65 20 6f 66 |is an ab|sence of|
|00002620| 20 74 68 65 20 47 65 74 | 50 6f 72 74 2c 20 53 65 | the Get|Port, Se|
|00002630| 74 50 6f 72 74 2c 20 64 | 6f 20 6d 79 20 74 68 69 |tPort, d|o my thi|
|00002640| 6e 67 2c 20 61 6e 64 0d | 23 20 74 68 65 6e 20 53 |ng, and.|# then S|
|00002650| 65 74 50 6f 72 74 20 61 | 67 61 69 6e 2e 20 20 49 |etPort a|gain. I|
|00002660| 6e 73 74 65 61 64 20 49 | 20 53 65 74 50 6f 72 74 |nstead I| SetPort|
|00002670| 20 61 6e 64 20 64 6f 20 | 6d 79 20 74 68 69 6e 67 | and do |my thing|
|00002680| 2e 20 20 54 68 65 20 4d | 61 63 20 6f 66 74 65 6e |. The M|ac often|
|00002690| 0d 23 20 69 73 20 73 65 | 74 74 69 6e 67 20 74 68 |.# is se|tting th|
|000026a0| 65 20 70 6f 72 74 20 75 | 6e 6e 65 63 65 73 73 61 |e port u|nnecessa|
|000026b0| 72 69 6c 79 2e 0d 23 0d | 23 20 53 74 72 69 6e 67 |rily..#.|# String|
|000026c0| 73 0d 23 20 2d 2d 2d 2d | 2d 2d 2d 0d 23 20 41 6c |s.# ----|---.# Al|
|000026d0| 6c 20 6f 66 20 6d 79 20 | 73 74 72 69 6e 67 73 20 |l of my |strings |
|000026e0| 61 72 65 20 72 65 73 6f | 75 72 63 65 73 2e 20 20 |are reso|urces. |
|000026f0| 54 68 65 72 65 20 61 72 | 65 20 6e 6f 20 73 74 72 |There ar|e no str|
|00002700| 69 6e 67 73 20 74 68 61 | 74 20 61 70 70 65 61 72 |ings tha|t appear|
|00002710| 0d 23 20 77 69 74 68 69 | 6e 20 74 68 65 20 63 6f |.# withi|n the co|
|00002720| 64 65 2e 20 20 54 68 69 | 73 20 68 65 6c 70 73 20 |de. Thi|s helps |
|00002730| 6d 65 6d 6f 72 79 20 6d | 61 6e 61 67 65 6d 65 6e |memory m|anagemen|
|00002740| 74 20 61 6e 64 20 61 6c | 6c 6f 77 73 20 6d 65 20 |t and al|lows me |
|00002750| 74 6f 20 61 64 6a 75 73 | 74 0d 23 20 74 68 65 20 |to adjus|t.# the |
|00002760| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 74 6f 20 69 |applicat|ion to i|
|00002770| 6e 74 65 72 6e 61 74 69 | 6f 6e 61 6c 20 73 79 73 |nternati|onal sys|
|00002780| 74 65 6d 73 20 77 69 74 | 68 6f 75 74 20 63 6f 6d |tems wit|hout com|
|00002790| 70 69 6c 69 6e 67 20 61 | 6e 79 20 63 6f 64 65 2e |piling a|ny code.|
|000027a0| 0d 23 20 49 20 63 6f 75 | 6c 64 20 73 69 6d 70 6c |.# I cou|ld simpl|
|000027b0| 79 20 75 73 65 20 52 65 | 73 45 64 69 74 2c 20 6f |y use Re|sEdit, o|
|000027c0| 72 20 73 6f 6d 65 20 6f | 74 68 65 72 20 74 6f 6f |r some o|ther too|
|000027d0| 6c 2c 20 74 6f 20 6c 6f | 63 61 6c 69 7a 65 20 74 |l, to lo|calize t|
|000027e0| 68 69 73 0d 23 20 61 70 | 70 6c 69 63 61 74 69 6f |his.# ap|plicatio|
|000027f0| 6e 2e 20 20 49 20 66 69 | 6e 64 20 69 74 20 69 73 |n. I fi|nd it is|
|00002800| 20 6a 75 73 74 20 61 73 | 20 65 61 73 79 20 74 6f | just as| easy to|
|00002810| 20 72 75 6e 20 52 65 7a | 20 61 67 61 69 6e 20 74 | run Rez| again t|
|00002820| 68 61 6e 0d 23 20 61 74 | 74 65 6d 70 74 69 6e 67 |han.# at|tempting|
|00002830| 20 74 6f 20 75 73 65 20 | 52 65 73 45 64 69 74 2e | to use |ResEdit.|
|00002840| 20 20 42 65 73 69 64 65 | 73 2c 20 61 66 74 65 72 | Beside|s, after|
|00002850| 20 65 64 69 74 69 6e 67 | 20 77 69 74 68 20 52 65 | editing| with Re|
|00002860| 73 45 64 69 74 20 49 20 | 77 61 6e 74 0d 23 20 74 |sEdit I |want.# t|
|00002870| 68 65 20 73 6f 75 72 63 | 65 20 66 6f 72 20 74 68 |he sourc|e for th|
|00002880| 61 74 20 61 6e 64 20 77 | 6f 75 6c 64 20 68 61 76 |at and w|ould hav|
|00002890| 65 20 74 6f 20 72 75 6e | 20 44 65 52 65 7a 20 77 |e to run| DeRez w|
|000028a0| 68 69 63 68 20 69 73 6e | d5 74 20 6e 65 61 72 6c |hich isn|.t nearl|
|000028b0| 79 20 61 73 0d 23 20 63 | 6c 65 61 6e 20 61 73 20 |y as.# c|lean as |
|000028c0| 6d 79 20 6f 72 69 67 69 | 6e 61 6c 20 73 6f 75 72 |my origi|nal sour|
|000028d0| 63 65 20 66 69 6c 65 73 | 2e 0d 23 0d 23 20 57 69 |ce files|..#.# Wi|
|000028e0| 6e 64 6f 77 20 53 74 61 | 63 6b 69 6e 67 0d 23 20 |ndow Sta|cking.# |
|000028f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00002900| 23 20 49 20 68 61 74 65 | 20 61 70 70 6c 69 63 61 |# I hate| applica|
|00002910| 74 69 6f 6e 73 20 74 68 | 61 74 20 77 69 6c 6c 20 |tions th|at will |
|00002920| 6f 70 65 6e 20 61 20 6e | 65 77 20 64 6f 63 75 6d |open a n|ew docum|
|00002930| 65 6e 74 20 74 68 61 74 | 20 63 6f 76 65 72 73 20 |ent that| covers |
|00002940| 75 70 20 61 6e 0d 23 20 | 65 78 69 73 74 69 6e 67 |up an.# |existing|
|00002950| 20 64 6f 63 75 6d 65 6e | 74 2c 20 75 6e 6c 65 73 | documen|t, unles|
|00002960| 73 20 74 68 65 20 6e 65 | 77 20 64 6f 63 75 6d 65 |s the ne|w docume|
|00002970| 6e 74 20 63 6f 76 65 72 | 73 20 74 68 65 20 65 6e |nt cover|s the en|
|00002980| 74 69 72 65 20 73 63 72 | 65 65 6e 2e 0d 23 20 53 |tire scr|een..# S|
|00002990| 6f 2c 20 6d 79 20 61 70 | 70 6c 69 63 61 74 69 6f |o, my ap|plicatio|
|000029a0| 6e d5 73 20 64 6f 63 75 | 6d 65 6e 74 73 20 68 61 |n.s docu|ments ha|
|000029b0| 76 65 20 61 20 73 6d 61 | 6c 6c 20 77 69 6e 64 6f |ve a sma|ll windo|
|000029c0| 77 20 73 69 7a 65 2e 20 | 20 49 20 77 61 6e 74 65 |w size. | I wante|
|000029d0| 64 20 74 6f 0d 23 20 6f | 70 65 6e 20 6e 65 77 20 |d to.# o|pen new |
|000029e0| 77 69 6e 64 6f 77 73 20 | 74 68 61 74 20 77 6f 75 |windows |that wou|
|000029f0| 6c 64 20 6e 6f 74 20 63 | 6f 76 65 72 20 75 70 20 |ld not c|over up |
|00002a00| 6f 6c 64 65 72 20 6f 6e | 65 73 2e 20 20 54 68 69 |older on|es. Thi|
|00002a10| 73 20 69 73 20 6e 69 63 | 65 20 66 6f 72 0d 23 20 |s is nic|e for.# |
|00002a20| 74 68 65 20 75 73 65 72 | 2c 20 73 69 6e 63 65 20 |the user|, since |
|00002a30| 74 68 65 79 20 77 69 6c | 6c 20 6e 6f 74 20 68 61 |they wil|l not ha|
|00002a40| 76 65 20 74 6f 20 6d 6f | 76 65 20 77 69 6e 64 6f |ve to mo|ve windo|
|00002a50| 77 73 20 6a 75 73 74 20 | 74 6f 20 67 65 74 20 61 |ws just |to get a|
|00002a60| 74 0d 23 20 6f 74 68 65 | 72 20 64 6f 63 75 6d 65 |t.# othe|r docume|
|00002a70| 6e 74 73 2e 20 20 52 65 | 73 45 64 69 74 20 77 69 |nts. Re|sEdit wi|
|00002a80| 6c 6c 20 73 74 61 67 67 | 65 72 20 6e 65 77 20 77 |ll stagg|er new w|
|00002a90| 69 6e 64 6f 77 73 20 6f | 66 66 20 6f 66 20 74 68 |indows o|ff of th|
|00002aa0| 65 0d 23 20 66 72 6f 6e | 74 6d 6f 73 74 20 77 69 |e.# fron|tmost wi|
|00002ab0| 6e 64 6f 77 20 62 75 74 | 20 49 20 66 69 6e 64 20 |ndow but| I find |
|00002ac0| 74 68 61 74 20 74 68 69 | 73 20 69 73 6e d5 74 20 |that thi|s isn.t |
|00002ad0| 74 68 65 20 62 65 73 74 | 20 61 70 70 72 6f 61 63 |the best| approac|
|00002ae0| 68 2e 20 20 49 74 0d 23 | 20 77 69 6c 6c 20 73 74 |h. It.#| will st|
|00002af0| 69 6c 6c 20 63 6f 76 65 | 72 20 75 70 20 6f 74 68 |ill cove|r up oth|
|00002b00| 65 72 20 77 69 6e 64 6f | 77 73 20 61 6e 64 20 49 |er windo|ws and I|
|00002b10| 20 61 6c 73 6f 20 64 6f | 6e d5 74 20 6c 69 6b 65 | also do|n.t like|
|00002b20| 20 77 69 6e 64 6f 77 73 | 20 74 68 61 74 0d 23 20 | windows| that.# |
|00002b30| 77 69 6c 6c 20 6f 70 65 | 6e 20 68 61 6c 66 20 77 |will ope|n half w|
|00002b40| 61 79 20 62 65 74 77 65 | 65 6e 20 74 77 6f 20 6d |ay betwe|en two m|
|00002b50| 6f 6e 69 74 6f 72 73 2e | 20 20 49 20 77 61 6e 74 |onitors.| I want|
|00002b60| 65 64 20 61 20 62 65 74 | 74 65 72 20 61 70 70 72 |ed a bet|ter appr|
|00002b70| 6f 61 63 68 3a 0d 23 20 | 6f 6e 65 20 74 68 61 74 |oach:.# |one that|
|00002b80| 20 77 6f 75 6c 64 20 61 | 6c 77 61 79 73 20 73 74 | would a|lways st|
|00002b90| 61 67 67 65 72 20 6e 65 | 77 20 77 69 6e 64 6f 77 |agger ne|w window|
|00002ba0| 73 20 61 6e 64 20 6e 6f | 74 20 63 6f 76 65 72 20 |s and no|t cover |
|00002bb0| 75 70 20 6f 6c 64 65 72 | 20 6f 6e 65 73 2e 0d 23 |up older| ones..#|
|00002bc0| 0d 23 20 57 68 65 6e 20 | 49 20 77 61 6e 74 20 74 |.# When |I want t|
|00002bd0| 6f 20 63 65 6e 74 65 72 | 20 61 20 77 69 6e 64 6f |o center| a windo|
|00002be0| 77 2c 20 49 20 6e 65 65 | 64 20 74 6f 20 6b 6e 6f |w, I nee|d to kno|
|00002bf0| 77 20 69 74 73 20 65 6e | 74 69 72 65 20 72 65 63 |w its en|tire rec|
|00002c00| 74 61 6e 67 6c 65 0d 23 | 20 73 69 7a 65 2e 20 20 |tangle.#| size. |
|00002c10| 54 68 65 20 72 75 62 20 | 69 73 20 74 68 61 74 20 |The rub |is that |
|00002c20| 49 20 63 61 6e 6e 6f 74 | 20 64 65 74 65 72 6d 69 |I cannot| determi|
|00002c30| 6e 65 20 69 74 73 20 73 | 69 7a 65 20 75 6e 74 69 |ne its s|ize unti|
|00002c40| 6c 20 49 20 73 68 6f 77 | 20 69 74 0d 23 20 62 65 |l I show| it.# be|
|00002c50| 63 61 75 73 65 20 49 20 | 6f 6e 6c 79 20 6b 6e 6f |cause I |only kno|
|00002c60| 77 20 61 62 6f 75 74 20 | 74 68 65 20 77 69 6e 64 |w about |the wind|
|00002c70| 6f 77 d5 73 20 62 6f 75 | 6e 64 73 52 65 63 74 2e |ow.s bou|ndsRect.|
|00002c80| 20 20 54 68 69 73 20 64 | 6f 65 73 20 6e 6f 74 0d | This d|oes not.|
|00002c90| 23 20 69 6e 63 6c 75 64 | 65 20 74 68 65 20 61 72 |# includ|e the ar|
|00002ca0| 65 61 20 74 68 61 74 20 | 63 6f 6e 74 61 69 6e 73 |ea that |contains|
|00002cb0| 20 74 68 65 20 74 69 74 | 6c 65 20 62 61 72 2e 20 | the tit|le bar. |
|00002cc0| 20 54 68 61 74 d5 73 20 | 74 68 65 20 73 74 72 75 | That.s |the stru|
|00002cd0| 63 52 67 6e 2c 0d 23 20 | 77 68 69 63 68 20 69 73 |cRgn,.# |which is|
|00002ce0| 20 61 6e 20 65 6d 70 74 | 79 20 72 65 67 69 6f 6e | an empt|y region|
|00002cf0| 20 66 6f 72 20 61 6e 20 | 69 6e 76 69 73 69 62 6c | for an |invisibl|
|00002d00| 65 20 77 69 6e 64 6f 77 | 2e 20 20 49 20 63 6f 75 |e window|. I cou|
|00002d10| 6c 64 20 64 6f 20 77 68 | 61 74 0d 23 20 4d 61 63 |ld do wh|at.# Mac|
|00002d20| 41 70 70 20 64 6f 65 73 | 2c 20 62 75 74 20 69 66 |App does|, but if|
|00002d30| 20 49 20 68 61 76 65 20 | 74 6f 20 64 6f 20 61 6e | I have |to do an|
|00002d40| 6f 74 68 65 72 20 74 68 | 69 6e 67 20 74 68 61 74 |other th|ing that|
|00002d50| 20 4d 61 63 41 70 70 20 | 61 6c 72 65 61 64 79 0d | MacApp |already.|
|00002d60| 23 20 64 6f 65 73 20 49 | d5 6c 6c 20 67 69 76 65 |# does I|.ll give|
|00002d70| 20 75 70 20 61 6e 64 20 | 73 74 69 63 6b 20 77 69 | up and |stick wi|
|00002d80| 74 68 20 4d 61 63 41 70 | 70 2e 20 20 49 20 65 6e |th MacAp|p. I en|
|00002d90| 64 65 64 20 75 70 20 77 | 72 69 74 69 6e 67 20 61 |ded up w|riting a|
|00002da0| 20 72 6f 75 74 69 6e 65 | 0d 23 20 74 68 61 74 20 | routine|.# that |
|00002db0| 74 61 6b 65 73 20 61 20 | 67 75 65 73 73 20 61 74 |takes a |guess at|
|00002dc0| 20 74 68 65 20 68 65 69 | 67 68 74 20 6f 66 20 74 | the hei|ght of t|
|00002dd0| 68 65 20 77 69 6e 64 6f | 77 d5 73 20 74 69 74 6c |he windo|w.s titl|
|00002de0| 65 20 62 61 72 2e 20 20 | 54 68 69 73 20 69 73 0d |e bar. |This is.|
|00002df0| 23 20 61 6e 6f 74 68 65 | 72 20 74 68 69 6e 67 20 |# anothe|r thing |
|00002e00| 74 68 61 74 20 77 61 73 | 20 68 61 72 64 65 72 20 |that was| harder |
|00002e10| 74 68 61 6e 20 69 74 20 | 73 68 6f 75 6c 64 20 68 |than it |should h|
|00002e20| 61 76 65 20 62 65 65 6e | 2e 0d 23 0d 23 20 44 69 |ave been|..#.# Di|
|00002e30| 61 6c 6f 67 20 4d 61 6e | 61 67 65 72 20 28 61 6e |alog Man|ager (an|
|00002e40| 64 20 73 6f 6d 65 20 6f | 66 20 74 68 65 20 72 65 |d some o|f the re|
|00002e50| 61 73 6f 6e 73 20 49 20 | 64 6f 6e d5 74 20 6c 69 |asons I |don.t li|
|00002e60| 6b 65 20 69 74 29 0d 23 | 20 2d 2d 2d 2d 2d 2d 2d |ke it).#| -------|
|00002e70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ea0| 2d 0d 23 20 4d 79 20 66 | 69 72 73 74 20 61 70 70 |-.# My f|irst app|
|00002eb0| 72 6f 61 63 68 20 77 61 | 73 20 74 6f 20 75 73 65 |roach wa|s to use|
|00002ec0| 20 6d 6f 64 65 6c 65 73 | 73 20 64 69 61 6c 6f 67 | modeles|s dialog|
|00002ed0| 73 20 66 6f 72 20 64 6f | 63 75 6d 65 6e 74 20 77 |s for do|cument w|
|00002ee0| 69 6e 64 6f 77 73 2c 0d | 23 20 74 68 69 6e 6b 69 |indows,.|# thinki|
|00002ef0| 6e 67 20 74 68 61 74 20 | 49 20 63 6f 75 6c 64 20 |ng that |I could |
|00002f00| 77 72 69 74 65 20 61 6e | 20 61 70 70 6c 69 63 61 |write an| applica|
|00002f10| 74 69 6f 6e 20 74 68 61 | 74 20 77 6f 75 6c 64 20 |tion tha|t would |
|00002f20| 64 65 6d 6f 6e 73 74 72 | 61 74 65 20 68 6f 77 20 |demonstr|ate how |
|00002f30| 74 6f 0d 23 20 64 65 61 | 6c 20 77 69 74 68 20 74 |to.# dea|l with t|
|00002f40| 68 65 6d 20 61 6e 64 20 | 61 6c 6c 20 6f 66 20 74 |hem and |all of t|
|00002f50| 68 65 69 72 20 69 64 69 | 6f 73 79 6e 63 72 61 73 |heir idi|osyncras|
|00002f60| 69 65 73 2e 20 20 4e 6f | 74 20 6c 6f 6e 67 20 69 |ies. No|t long i|
|00002f70| 6e 74 6f 20 74 68 65 0d | 23 20 64 65 76 65 6c 6f |nto the.|# develo|
|00002f80| 70 6d 65 6e 74 20 63 79 | 63 6c 65 20 69 74 20 62 |pment cy|cle it b|
|00002f90| 65 63 61 6d 65 20 6f 62 | 76 69 6f 75 73 20 74 6f |ecame ob|vious to|
|00002fa0| 20 6d 65 20 74 68 61 74 | 20 49 20 77 61 73 20 66 | me that| I was f|
|00002fb0| 69 67 68 74 69 6e 67 20 | 73 6f 6d 65 74 68 69 6e |ighting |somethin|
|00002fc0| 67 0d 23 20 74 68 61 74 | 20 63 6f 6e 74 61 69 6e |g.# that| contain|
|00002fd0| 65 64 20 6d 6f 72 65 20 | 64 69 73 61 64 76 61 6e |ed more |disadvan|
|00002fe0| 74 61 67 65 73 20 74 68 | 61 6e 20 61 64 76 61 6e |tages th|an advan|
|00002ff0| 74 61 67 65 73 2e 20 20 | 49 20 72 65 6d 6f 76 65 |tages. |I remove|
|00003000| 64 20 61 6c 6c 20 74 68 | 65 0d 23 20 64 69 61 6c |d all th|e.# dial|
|00003010| 6f 67 20 63 6f 64 65 20 | 61 6e 64 20 6f 6e 6c 79 |og code |and only|
|00003020| 20 75 73 65 64 20 73 74 | 61 6e 64 61 72 64 20 77 | used st|andard w|
|00003030| 69 6e 64 6f 77 73 20 61 | 6e 64 20 63 6f 6e 74 72 |indows a|nd contr|
|00003040| 6f 6c 73 20 74 68 65 20 | 6f 6c 64 20 66 61 73 68 |ols the |old fash|
|00003050| 69 6f 6e 0d 23 20 77 61 | 79 2e 20 20 49 6e 20 74 |ion.# wa|y. In t|
|00003060| 68 65 20 63 61 73 65 20 | 6f 66 20 74 68 65 20 41 |he case |of the A|
|00003070| 62 6f 75 74 20 77 69 6e | 64 6f 77 2c 20 77 68 69 |bout win|dow, whi|
|00003080| 63 68 20 69 73 20 73 65 | 6d 69 2d 6d 6f 64 61 6c |ch is se|mi-modal|
|00003090| 2c 20 49 20 68 61 76 65 | 20 61 20 74 65 73 74 0d |, I have| a test.|
|000030a0| 23 20 74 68 61 74 20 77 | 69 6c 6c 20 72 65 74 75 |# that w|ill retu|
|000030b0| 72 6e 20 54 52 55 45 20 | 66 6f 72 20 61 20 77 69 |rn TRUE |for a wi|
|000030c0| 6e 64 6f 77 20 74 68 61 | 74 20 73 68 6f 75 6c 64 |ndow tha|t should|
|000030d0| 20 62 65 20 74 72 65 61 | 74 65 64 20 61 73 20 6d | be trea|ted as m|
|000030e0| 6f 64 61 6c 2e 20 20 54 | 68 69 73 0d 23 20 61 6c |odal. T|his.# al|
|000030f0| 6c 6f 77 73 20 6d 79 20 | 77 69 6e 64 6f 77 20 74 |lows my |window t|
|00003100| 6f 20 62 65 20 68 61 6e | 64 6c 65 64 20 62 79 20 |o be han|dled by |
|00003110| 6d 79 20 73 74 61 6e 64 | 61 72 64 20 65 76 65 6e |my stand|ard even|
|00003120| 74 20 68 61 6e 64 6c 65 | 72 73 20 61 6e 64 20 49 |t handle|rs and I|
|00003130| 20 64 6f 6e d5 74 0d 23 | 20 68 61 76 65 20 74 6f | don.t.#| have to|
|00003140| 20 77 72 69 74 65 20 64 | 69 61 6c 6f 67 20 66 69 | write d|ialog fi|
|00003150| 6c 74 65 72 73 2e 20 20 | 54 68 65 72 65 20 61 72 |lters. |There ar|
|00003160| 65 20 73 6f 6d 65 20 74 | 68 69 6e 67 73 20 74 68 |e some t|hings th|
|00003170| 61 74 20 64 6f 20 6e 6f | 74 20 67 65 74 0d 23 20 |at do no|t get.# |
|00003180| 68 61 6e 64 6c 65 64 20 | 70 72 6f 70 65 72 6c 79 |handled |properly|
|00003190| 20 77 68 69 6c 65 20 63 | 61 6c 6c 69 6e 67 20 4d | while c|alling M|
|000031a0| 6f 64 61 6c 44 69 61 6c | 6f 67 2e 20 20 4d 6f 64 |odalDial|og. Mod|
|000031b0| 61 6c 44 69 61 6c 6f 67 | 20 69 67 6e 6f 72 65 73 |alDialog| ignores|
|000031c0| 20 64 69 73 6b 0d 23 20 | 69 6e 73 65 72 74 20 65 | disk.# |insert e|
|000031d0| 76 65 6e 74 73 2e 20 20 | 54 68 65 20 61 63 74 69 |vents. |The acti|
|000031e0| 76 61 74 65 20 6f 72 20 | 75 70 64 61 74 65 20 65 |vate or |update e|
|000031f0| 76 65 6e 74 73 20 64 6f | 20 6e 6f 74 20 67 65 74 |vents do| not get|
|00003200| 20 68 61 6e 64 6c 65 64 | 20 66 6f 72 0d 23 20 62 | handled| for.# b|
|00003210| 61 63 6b 67 72 6f 75 6e | 64 20 77 69 6e 64 6f 77 |ackgroun|d window|
|00003220| 73 2e 20 20 55 73 69 6e | 67 20 61 20 6d 6f 64 65 |s. Usin|g a mode|
|00003230| 6c 65 73 73 20 64 69 61 | 6c 6f 67 20 66 61 69 6c |less dia|log fail|
|00003240| 73 20 77 69 74 68 20 4d | 75 6c 74 69 46 69 6e 64 |s with M|ultiFind|
|00003250| 65 72 20 69 66 0d 23 20 | 73 77 69 74 63 68 69 6e |er if.# |switchin|
|00003260| 67 20 74 61 6b 65 73 20 | 70 6c 61 63 65 20 77 68 |g takes |place wh|
|00003270| 69 6c 65 20 74 68 65 20 | 64 69 61 6c 6f 67 20 69 |ile the |dialog i|
|00003280| 73 20 74 68 65 20 66 72 | 6f 6e 74 6d 6f 73 74 20 |s the fr|ontmost |
|00003290| 77 69 6e 64 6f 77 2e 20 | 20 54 68 65 0d 23 20 70 |window. | The.# p|
|000032a0| 72 6f 62 6c 65 6d 20 69 | 73 20 74 68 61 74 20 44 |roblem i|s that D|
|000032b0| 69 61 6c 6f 67 53 65 6c | 65 63 74 20 69 67 6e 6f |ialogSel|ect igno|
|000032c0| 72 65 73 20 61 6e 64 20 | 72 65 6d 6f 76 65 73 20 |res and |removes |
|000032d0| 74 68 65 20 73 75 73 70 | 65 6e 64 2f 72 65 73 75 |the susp|end/resu|
|000032e0| 6d 65 20 65 76 65 6e 74 | 2e 0d 23 20 41 6e 6f 74 |me event|..# Anot|
|000032f0| 68 65 72 20 61 64 76 61 | 6e 74 61 67 65 20 74 6f |her adva|ntage to|
|00003300| 20 61 6c 6c 20 74 68 69 | 73 20 69 73 20 74 68 61 | all thi|s is tha|
|00003310| 74 20 64 72 61 77 69 6e | 67 20 77 61 73 20 6d 75 |t drawin|g was mu|
|00003320| 63 68 20 66 61 73 74 65 | 72 2e 0d 23 0d 23 20 41 |ch faste|r..#.# A|
|00003330| 73 20 61 6e 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |s an exa|mple of |
|00003340| 73 6f 6d 65 20 6f 66 20 | 74 68 65 20 70 72 6f 62 |some of |the prob|
|00003350| 6c 65 6d 73 20 77 69 74 | 68 20 4d 6f 64 61 6c 44 |lems wit|h ModalD|
|00003360| 69 61 6c 6f 67 20 61 6e | 64 20 74 68 65 20 61 63 |ialog an|d the ac|
|00003370| 74 69 76 61 74 65 0d 23 | 20 65 76 65 6e 74 2e 20 |tivate.#| event. |
|00003380| 20 54 72 79 20 74 68 69 | 73 20 77 69 74 68 20 74 | Try thi|s with t|
|00003390| 68 65 20 46 69 6e 64 65 | 72 2e 20 20 4f 70 65 6e |he Finde|r. Open|
|000033a0| 20 61 20 77 69 6e 64 6f | 77 20 61 6e 64 20 63 68 | a windo|w and ch|
|000033b0| 6f 6f 73 65 20 d2 56 69 | 65 77 20 62 79 20 6e 61 |oose .Vi|ew by na|
|000033c0| 6d 65 2e d3 0d 23 20 54 | 68 65 6e 20 73 65 6c 65 |me...# T|hen sele|
|000033d0| 63 74 20 61 20 66 65 77 | 20 6e 61 6d 65 73 20 77 |ct a few| names w|
|000033e0| 69 74 68 20 74 68 65 20 | 73 68 69 66 74 20 6b 65 |ith the |shift ke|
|000033f0| 79 20 61 6e 64 20 72 65 | 73 69 7a 65 20 74 68 65 |y and re|size the|
|00003400| 20 77 69 6e 64 6f 77 20 | 73 6f 20 74 68 65 0d 23 | window |so the.#|
|00003410| 20 76 65 72 74 69 63 61 | 6c 20 73 63 72 6f 6c 6c | vertica|l scroll|
|00003420| 20 62 61 72 20 69 73 20 | 76 69 73 69 62 6c 65 2e | bar is |visible.|
|00003430| 20 20 4d 6f 76 65 20 74 | 68 69 73 20 77 69 6e 64 | Move t|his wind|
|00003440| 6f 77 20 74 6f 20 6f 6e | 65 20 65 64 67 65 20 6f |ow to on|e edge o|
|00003450| 66 20 74 68 65 0d 23 20 | 73 63 72 65 65 6e 20 6f |f the.# |screen o|
|00003460| 72 20 61 20 73 65 63 6f | 6e 64 20 6d 6f 6e 69 74 |r a seco|nd monit|
|00003470| 6f 72 2e 20 20 4e 6f 77 | 20 63 68 6f 6f 73 65 20 |or. Now| choose |
|00003480| d2 53 65 74 20 53 74 61 | 72 74 75 70 2e d3 20 20 |.Set Sta|rtup.. |
|00003490| 54 68 69 73 20 69 73 20 | 61 20 6d 6f 64 61 6c 0d |This is |a modal.|
|000034a0| 23 20 64 69 61 6c 6f 67 | 2e 20 20 49 66 20 79 6f |# dialog|. If yo|
|000034b0| 75 20 6c 6f 6f 6b 20 61 | 74 20 74 68 65 20 46 69 |u look a|t the Fi|
|000034c0| 6e 64 65 72 20 77 69 6e | 64 6f 77 20 77 69 74 68 |nder win|dow with|
|000034d0| 20 74 68 65 20 73 65 6c | 65 63 74 65 64 20 66 69 | the sel|ected fi|
|000034e0| 6c 65 73 2c 20 79 6f 75 | d5 6c 6c 0d 23 20 6e 6f |les, you|.ll.# no|
|000034f0| 74 69 63 65 20 74 68 61 | 74 20 74 68 65 20 73 63 |tice tha|t the sc|
|00003500| 72 6f 6c 6c 62 61 72 20 | 61 6e 64 20 74 68 65 20 |rollbar |and the |
|00003510| 74 65 78 74 20 61 72 65 | 20 73 74 69 6c 6c 20 68 |text are| still h|
|00003520| 69 67 68 6c 69 74 65 64 | 2e 20 20 54 68 69 73 20 |ighlited|. This |
|00003530| 69 73 20 6e 6f 74 0d 23 | 20 74 68 65 20 70 72 6f |is not.#| the pro|
|00003540| 70 65 72 20 75 73 65 72 | 20 69 6e 74 65 72 66 61 |per user| interfa|
|00003550| 63 65 2e 20 20 54 68 69 | 73 20 69 73 20 62 65 63 |ce. Thi|s is bec|
|00003560| 61 75 73 65 20 74 68 65 | 20 64 65 61 63 74 69 76 |ause the| deactiv|
|00003570| 61 74 65 20 72 6f 75 74 | 69 6e 65 73 20 61 72 65 |ate rout|ines are|
|00003580| 0d 23 20 6e 6f 74 20 63 | 61 6c 6c 65 64 20 77 68 |.# not c|alled wh|
|00003590| 69 6c 65 20 69 6e 20 4d | 6f 64 61 6c 44 69 61 6c |ile in M|odalDial|
|000035a0| 6f 67 2e 20 20 59 6f 75 | 20 63 61 6e 20 65 76 65 |og. You| can eve|
|000035b0| 6e 20 66 69 6e 64 20 74 | 68 69 73 20 70 72 6f 62 |n find t|his prob|
|000035c0| 6c 65 6d 20 77 69 74 68 | 0d 23 20 53 6f 75 6e 64 |lem with|.# Sound|
|000035d0| 41 70 70 2e 20 20 4f 6e | 20 64 65 61 63 74 69 76 |App. On| deactiv|
|000035e0| 61 74 65 20 65 76 65 6e | 74 73 20 49 20 77 69 6c |ate even|ts I wil|
|000035f0| 6c 20 63 68 61 6e 67 65 | 20 6d 79 20 63 6f 6e 74 |l change| my cont|
|00003600| 72 6f 6c 73 20 74 6f 20 | 74 68 65 20 69 6e 61 63 |rols to |the inac|
|00003610| 74 69 76 65 0d 23 20 73 | 74 61 74 65 2e 20 20 49 |tive.# s|tate. I|
|00003620| 66 20 79 6f 75 20 70 6c | 61 63 65 20 74 68 65 20 |f you pl|ace the |
|00003630| 62 75 74 74 6f 6e 73 20 | 74 6f 20 74 68 65 20 73 |buttons |to the s|
|00003640| 69 64 65 20 6f 66 20 74 | 68 65 20 73 63 72 65 65 |ide of t|he scree|
|00003650| 6e 20 61 6e 64 20 74 68 | 65 6e 20 62 72 69 6e 67 |n and th|en bring|
|00003660| 0d 23 20 75 70 20 74 68 | 65 20 73 74 61 6e 64 61 |.# up th|e standa|
|00003670| 72 64 20 66 69 6c 65 20 | 64 69 61 6c 6f 67 2c 20 |rd file |dialog, |
|00003680| 79 6f 75 d5 6c 6c 20 6e | 6f 74 69 63 65 20 74 68 |you.ll n|otice th|
|00003690| 61 74 20 74 68 65 20 62 | 75 74 74 6f 6e 73 20 64 |at the b|uttons d|
|000036a0| 6f 6e d5 74 20 63 68 61 | 6e 67 65 0d 23 20 70 72 |on.t cha|nge.# pr|
|000036b0| 6f 70 65 72 6c 79 2e 20 | 20 4d 6f 64 61 6c 44 69 |operly. | ModalDi|
|000036c0| 61 6c 6f 67 20 61 6c 73 | 6f 20 70 72 65 76 65 6e |alog als|o preven|
|000036d0| 74 73 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |ts the a|pplicati|
|000036e0| 6f 6e 20 66 72 6f 6d 20 | 75 70 64 61 74 69 6e 67 |on from |updating|
|000036f0| 0d 23 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 77 69 |.# backg|round wi|
|00003700| 6e 64 6f 77 73 20 74 6f | 6f 2e 20 20 54 6f 20 73 |ndows to|o. To s|
|00003710| 6f 6c 76 65 20 74 68 69 | 73 20 61 20 64 69 61 6c |olve thi|s a dial|
|00003720| 6f 67 20 66 69 6c 74 65 | 72 20 70 72 6f 63 65 64 |og filte|r proced|
|00003730| 75 72 65 20 69 73 0d 23 | 20 72 65 71 75 69 72 65 |ure is.#| require|
|00003740| 64 2e 20 20 49 6e 20 6d | 6f 73 74 20 63 61 73 65 |d. In m|ost case|
|00003750| 73 2c 20 74 68 69 73 20 | 66 69 6c 74 65 72 20 77 |s, this |filter w|
|00003760| 6f 75 6c 64 20 62 65 20 | 61 73 20 63 6f 6d 70 6c |ould be |as compl|
|00003770| 65 78 20 61 6e 64 20 74 | 68 65 20 65 76 65 6e 74 |ex and t|he event|
|00003780| 0d 23 20 6c 6f 6f 70 2e | 20 20 49 74 20 77 6f 75 |.# loop.| It wou|
|00003790| 6c 64 20 61 6c 73 6f 20 | 6d 61 6b 65 20 69 74 20 |ld also |make it |
|000037a0| 6e 65 63 65 73 73 61 72 | 79 20 74 6f 20 63 61 6c |necessar|y to cal|
|000037b0| 6c 20 79 6f 75 72 20 65 | 76 65 6e 74 20 72 6f 75 |l your e|vent rou|
|000037c0| 74 69 6e 65 73 20 66 72 | 6f 6d 0d 23 20 6f 75 74 |tines fr|om.# out|
|000037d0| 73 69 64 65 20 6f 66 20 | 74 68 65 20 6e 6f 72 6d |side of |the norm|
|000037e0| 61 6c 20 65 76 65 6e 74 | 20 6c 6f 6f 70 2e 20 20 |al event| loop. |
|000037f0| 41 6c 6c 20 6f 6e 20 74 | 68 69 73 20 69 73 6e d5 |All on t|his isn.|
|00003800| 74 20 77 6f 72 74 68 20 | 74 68 65 20 65 66 66 6f |t worth |the effo|
|00003810| 72 74 2e 0d 23 0d 23 20 | 59 6f 75 20 63 61 6e 20 |rt..#.# |You can |
|00003820| 73 65 65 20 68 6f 77 20 | 74 68 69 73 20 64 6f 65 |see how |this doe|
|00003830| 73 20 6e 6f 74 20 68 61 | 70 70 65 6e 20 77 68 69 |s not ha|ppen whi|
|00003840| 6c 65 20 75 73 69 6e 67 | 20 74 68 69 73 20 61 70 |le using| this ap|
|00003850| 70 6c 69 63 61 74 69 6f | 6e d5 73 0d 23 20 41 62 |plicatio|n.s.# Ab|
|00003860| 6f 75 74 20 77 69 6e 64 | 6f 77 2e 20 20 53 65 6c |out wind|ow. Sel|
|00003870| 65 63 74 20 61 6e 20 69 | 74 65 6d 20 69 6e 20 74 |ect an i|tem in t|
|00003880| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 77 69 6e 64 |he docum|ent wind|
|00003890| 6f 77 20 61 6e 64 20 63 | 68 6f 6f 73 65 20 d2 50 |ow and c|hoose .P|
|000038a0| 6c 61 79 0d 23 20 4d 65 | 6c 6f 64 79 2e d3 20 20 |lay.# Me|lody.. |
|000038b0| 54 68 69 73 20 77 69 6c | 6c 20 6c 65 61 76 65 20 |This wil|l leave |
|000038c0| 74 68 65 20 73 74 61 74 | 75 73 20 77 69 6e 64 6f |the stat|us windo|
|000038d0| 77 20 6f 6e 20 73 63 72 | 65 65 6e 20 73 6f 20 74 |w on scr|een so t|
|000038e0| 68 61 74 20 79 6f 75 20 | 63 61 6e 0d 23 20 64 72 |hat you |can.# dr|
|000038f0| 61 67 20 69 74 20 74 6f | 20 63 6f 76 65 72 20 74 |ag it to| cover t|
|00003900| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 77 69 6e 64 |he docum|ent wind|
|00003910| 6f 77 2e 20 20 4e 6f 77 | 20 73 65 6c 65 63 74 20 |ow. Now| select |
|00003920| d2 41 62 6f 75 74 20 53 | 6f 75 6e 64 41 70 70 d3 |.About S|oundApp.|
|00003930| 20 74 6f 0d 23 20 62 72 | 69 6e 67 20 75 70 20 74 | to.# br|ing up t|
|00003940| 68 65 20 61 62 6f 75 74 | 20 77 69 6e 64 6f 77 2e |he about| window.|
|00003950| 20 20 54 68 69 73 20 63 | 61 75 73 65 73 20 74 68 | This c|auses th|
|00003960| 65 20 73 74 61 74 75 73 | 20 77 69 6e 64 6f 77 20 |e status| window |
|00003970| 74 6f 20 63 6c 6f 73 65 | 2c 0d 23 20 77 68 69 63 |to close|,.# whic|
|00003980| 68 20 75 6e 63 6f 76 65 | 72 73 20 74 68 65 20 64 |h uncove|rs the d|
|00003990| 6f 63 75 6d 65 6e 74 20 | 77 69 6e 64 6f 77 20 6c |ocument |window l|
|000039a0| 65 61 76 69 6e 67 20 61 | 6e 20 69 6e 76 61 6c 69 |eaving a|n invali|
|000039b0| 64 20 61 72 65 61 2e 20 | 20 54 68 65 0d 23 20 64 |d area. | The.# d|
|000039c0| 6f 63 75 6d 65 6e 74 20 | 77 69 6e 64 6f 77 20 67 |ocument |window g|
|000039d0| 65 74 73 20 61 6e 20 61 | 63 74 69 76 61 74 65 20 |ets an a|ctivate |
|000039e0| 65 76 65 6e 74 2c 20 74 | 68 65 6e 20 74 68 65 20 |event, t|hen the |
|000039f0| 41 62 6f 75 74 20 77 69 | 6e 64 6f 77 20 61 70 70 |About wi|ndow app|
|00003a00| 65 61 72 73 2e 0d 23 20 | 54 68 65 6e 20 74 68 65 |ears..# |Then the|
|00003a10| 20 64 6f 63 75 6d 65 6e | 74 20 77 69 6e 64 6f 77 | documen|t window|
|00003a20| 20 69 73 20 70 72 6f 70 | 65 72 6c 79 20 64 65 61 | is prop|erly dea|
|00003a30| 63 74 69 76 61 74 65 64 | 20 61 6e 64 20 75 70 64 |ctivated| and upd|
|00003a40| 61 74 65 64 2e 20 20 59 | 65 61 68 2c 0d 23 20 6a |ated. Y|eah,.# j|
|00003a50| 75 73 74 20 6c 69 6b 65 | 20 69 74 20 73 68 6f 75 |ust like| it shou|
|00003a60| 6c 64 20 68 61 70 70 65 | 6e 2e 0d 23 0d 23 20 53 |ld happe|n..#.# S|
|00003a70| 6f 2c 20 74 68 65 20 74 | 72 61 64 65 6f 66 66 20 |o, the t|radeoff |
|00003a80| 77 61 73 20 74 68 61 74 | 20 49 20 64 69 64 6e d5 |was that| I didn.|
|00003a90| 74 20 68 61 76 65 20 74 | 6f 20 77 6f 72 6b 20 61 |t have t|o work a|
|00003aa0| 72 6f 75 6e 64 20 61 6c | 6c 20 74 68 65 0d 23 20 |round al|l the.# |
|00003ab0| 73 74 72 61 6e 67 65 20 | 74 68 69 6e 67 73 20 74 |strange |things t|
|00003ac0| 68 65 20 44 69 61 6c 6f | 67 20 4d 61 6e 61 67 65 |he Dialo|g Manage|
|00003ad0| 72 20 64 6f 65 73 20 73 | 75 63 68 20 61 73 20 72 |r does s|uch as r|
|00003ae0| 75 6e 6e 69 6e 67 20 61 | 20 73 65 63 6f 6e 64 61 |unning a| seconda|
|00003af0| 72 79 0d 23 20 65 76 65 | 6e 74 20 6c 6f 6f 70 2c |ry.# eve|nt loop,|
|00003b00| 20 61 6e 64 20 72 65 71 | 75 69 72 69 6e 67 20 6d | and req|uiring m|
|00003b10| 65 20 74 6f 20 68 61 76 | 65 20 75 73 65 72 49 74 |e to hav|e userIt|
|00003b20| 65 6d 73 20 6f 72 20 66 | 69 6c 74 65 72 50 72 6f |ems or f|ilterPro|
|00003b30| 63 73 2e 20 20 54 68 69 | 73 0d 23 20 6d 61 64 65 |cs. Thi|s.# made|
|00003b40| 20 74 68 65 20 63 6f 64 | 65 20 73 6d 61 6c 6c 65 | the cod|e smalle|
|00003b50| 72 2c 20 6d 6f 72 65 20 | 72 65 61 64 61 62 6c 65 |r, more |readable|
|00003b60| 2c 20 61 6e 64 20 66 61 | 73 74 65 72 2e 20 20 49 |, and fa|ster. I|
|00003b70| 20 74 68 69 6e 6b 20 49 | 20 77 69 6c 6c 0d 23 20 | think I| will.# |
|00003b80| 61 76 6f 69 64 20 74 68 | 65 20 44 69 61 6c 6f 67 |avoid th|e Dialog|
|00003b90| 20 4d 61 6e 67 65 72 20 | 66 72 6f 6d 20 6e 6f 77 | Manger |from now|
|00003ba0| 20 6f 6e 65 20 75 6e 6c | 65 73 73 20 49 d5 6d 20 | one unl|ess I.m |
|00003bb0| 75 73 69 6e 67 20 61 20 | 76 65 72 79 20 73 69 6d |using a |very sim|
|00003bc0| 70 6c 65 0d 23 20 64 69 | 61 6c 6f 67 2e 20 20 54 |ple.# di|alog. T|
|00003bd0| 68 65 20 61 62 6f 75 74 | 20 77 69 6e 64 6f 77 20 |he about| window |
|00003be0| 6f 66 20 74 68 69 73 20 | 61 70 70 6c 69 63 61 74 |of this |applicat|
|00003bf0| 69 6f 6e 20 70 72 6f 76 | 65 64 20 74 6f 6f 20 6d |ion prov|ed too m|
|00003c00| 75 63 68 20 66 6f 72 20 | 74 68 65 0d 23 20 44 69 |uch for |the.# Di|
|00003c10| 61 6c 6f 67 20 4d 61 6e | 61 67 65 72 2e 0d 23 0d |alog Man|ager..#.|
|00003c20| 23 20 4f 6e 65 20 74 68 | 69 6e 67 20 64 69 61 6c |# One th|ing dial|
|00003c30| 6f 67 73 20 61 72 65 20 | 67 6f 6f 64 20 66 6f 72 |ogs are |good for|
|00003c40| 20 69 73 20 72 75 6e 6e | 69 6e 67 20 52 65 73 45 | is runn|ing ResE|
|00003c50| 64 69 74 20 61 6e 64 20 | 6c 61 79 69 6e 67 20 6f |dit and |laying o|
|00003c60| 75 74 20 74 68 65 0d 23 | 20 64 69 61 6c 6f 67 2e |ut the.#| dialog.|
|00003c70| 20 20 54 6f 20 68 65 6c | 70 20 70 6f 73 69 74 69 | To hel|p positi|
|00003c80| 6f 6e 20 63 6f 6e 74 72 | 6f 6c 73 2c 20 49 20 75 |on contr|ols, I u|
|00003c90| 73 65 64 20 61 20 44 4c | 4f 47 20 72 65 73 6f 75 |sed a DL|OG resou|
|00003ca0| 72 63 65 20 6f 66 20 74 | 68 65 20 73 61 6d 65 0d |rce of t|he same.|
|00003cb0| 23 20 73 69 7a 65 20 61 | 73 20 6d 79 20 57 49 4e |# size a|s my WIN|
|00003cc0| 44 20 72 65 73 6f 75 72 | 63 65 2e 20 20 54 68 65 |D resour|ce. The|
|00003cd0| 20 44 49 54 4c 20 6f 66 | 20 74 68 69 73 20 64 69 | DITL of| this di|
|00003ce0| 61 6c 6f 67 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |alog con|tains th|
|00003cf0| 65 0d 23 20 70 6f 73 69 | 74 69 6f 6e 73 20 49 20 |e.# posi|tions I |
|00003d00| 77 61 6e 74 65 64 20 66 | 6f 72 20 6d 79 20 43 4e |wanted f|or my CN|
|00003d10| 54 4c 20 72 65 73 6f 75 | 72 63 65 73 2e 20 20 54 |TL resou|rces. T|
|00003d20| 68 69 73 20 68 65 6c 70 | 65 64 20 6d 65 20 74 6f |his help|ed me to|
|00003d30| 20 6c 6f 6f 6b 20 61 74 | 0d 23 20 77 68 65 72 65 | look at|.# where|
|00003d40| 20 49 20 63 6f 75 6c 64 | 20 65 78 70 65 63 74 20 | I could| expect |
|00003d50| 6d 79 20 62 75 74 74 6f | 6e 73 20 74 6f 20 73 68 |my butto|ns to sh|
|00003d60| 6f 77 20 75 70 2e 20 20 | 54 68 69 73 20 69 73 20 |ow up. |This is |
|00003d70| 6f 6e 65 20 6f 66 20 74 | 68 65 20 6d 61 69 6e 0d |one of t|he main.|
|00003d80| 23 20 72 65 61 73 6f 6e | 73 20 70 65 6f 70 6c 65 |# reason|s people|
|00003d90| 20 74 68 69 6e 6b 20 74 | 68 65 79 20 6e 65 65 64 | think t|hey need|
|00003da0| 20 74 68 65 20 44 69 61 | 6c 6f 67 20 4d 61 6e 61 | the Dia|log Mana|
|00003db0| 67 65 72 2c 20 62 65 63 | 61 75 73 65 20 52 65 73 |ger, bec|ause Res|
|00003dc0| 45 64 69 74 0d 23 20 6d | 61 6b 65 73 20 69 74 20 |Edit.# m|akes it |
|00003dd0| 65 61 73 79 20 74 6f 20 | 62 75 69 6c 64 20 64 69 |easy to |build di|
|00003de0| 61 6c 6f 67 73 2e 20 20 | 52 65 73 45 64 69 74 20 |alogs. |ResEdit |
|00003df0| 61 6c 6f 6e 65 20 68 61 | 73 20 63 6f 6e 74 72 69 |alone ha|s contri|
|00003e00| 62 75 74 65 64 20 74 6f | 0d 23 20 6e 65 61 72 6c |buted to|.# nearl|
|00003e10| 79 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 44 69 61 |y all of| the Dia|
|00003e20| 6c 6f 67 20 4d 61 6e 61 | 67 65 72 20 61 62 75 73 |log Mana|ger abus|
|00003e30| 65 20 69 6e 20 74 68 65 | 20 77 6f 72 6c 64 20 74 |e in the| world t|
|00003e40| 6f 64 61 79 2e 0d 23 0d | 23 20 49 20 75 73 65 64 |oday..#.|# I used|
|00003e50| 20 61 20 52 65 63 74 20 | 72 65 73 6f 75 72 63 65 | a Rect |resource|
|00003e60| 20 66 6f 72 20 70 6f 73 | 69 74 69 6f 6e 69 6e 67 | for pos|itioning|
|00003e70| 20 74 68 65 20 6c 69 73 | 74 20 72 65 63 74 61 6e | the lis|t rectan|
|00003e80| 67 6c 65 20 6f 66 20 74 | 68 65 0d 23 20 64 6f 63 |gle of t|he.# doc|
|00003e90| 75 6d 65 6e 74 20 77 69 | 6e 64 6f 77 73 2e 20 20 |ument wi|ndows. |
|00003ea0| 54 68 65 73 65 20 77 69 | 6e 64 6f 77 73 20 6c 6f |These wi|ndows lo|
|00003eb0| 6f 6b 20 76 65 72 79 20 | 6d 75 63 68 20 6c 69 6b |ok very |much lik|
|00003ec0| 65 20 61 20 6d 6f 64 65 | 6c 65 73 73 0d 23 20 64 |e a mode|less.# d|
|00003ed0| 69 61 6c 6f 67 2e 20 20 | 28 54 68 65 79 20 75 73 |ialog. |(They us|
|00003ee0| 65 64 20 74 6f 20 62 65 | 2c 20 62 75 74 20 74 68 |ed to be|, but th|
|00003ef0| 61 74 20 70 72 65 73 65 | 6e 74 65 64 20 74 6f 20 |at prese|nted to |
|00003f00| 6d 61 6e 79 20 70 72 6f | 62 6c 65 6d 73 2e 29 20 |many pro|blems.) |
|00003f10| 20 54 68 65 0d 23 20 41 | 62 6f 75 74 20 77 69 6e | The.# A|bout win|
|00003f20| 64 6f 77 20 69 73 20 61 | 6c 73 6f 20 61 20 73 74 |dow is a|lso a st|
|00003f30| 61 6e 64 61 72 64 20 77 | 69 6e 64 6f 77 2c 20 62 |andard w|indow, b|
|00003f40| 75 74 20 73 68 6f 77 6e | 20 6d 6f 64 61 6c 6c 79 |ut shown| modally|
|00003f50| 2e 20 20 4a 75 73 74 20 | 6c 69 6b 65 0d 23 20 4d |. Just |like.# M|
|00003f60| 6f 64 61 6c 44 69 61 6c | 6f 67 2c 20 62 75 74 20 |odalDial|og, but |
|00003f70| 6d 79 20 6d 6f 64 61 6c | 20 77 69 6e 64 6f 77 20 |my modal| window |
|00003f80| 64 6f 65 73 20 61 6c 6c | 6f 77 20 73 77 69 74 63 |does all|ow switc|
|00003f90| 68 69 6e 67 20 75 6e 64 | 65 72 0d 23 20 4d 75 6c |hing und|er.# Mul|
|00003fa0| 74 69 46 69 6e 64 65 72 | 2e 20 20 59 6f 75 20 63 |tiFinder|. You c|
|00003fb0| 61 6e 20 63 68 61 6e 67 | 65 20 74 68 65 20 77 69 |an chang|e the wi|
|00003fc0| 6e 64 6f 77 20 74 6f 20 | 61 20 64 42 6f 78 50 72 |ndow to |a dBoxPr|
|00003fd0| 6f 63 20 61 6e 64 20 74 | 68 65 6e 0d 23 20 4d 75 |oc and t|hen.# Mu|
|00003fe0| 6c 74 69 46 69 6e 64 65 | 72 20 77 69 6c 6c 20 6e |ltiFinde|r will n|
|00003ff0| 6f 74 20 73 77 69 74 63 | 68 20 77 68 69 6c 65 20 |ot switc|h while |
|00004000| 74 68 69 73 20 69 73 20 | 74 68 65 20 61 63 74 69 |this is |the acti|
|00004010| 76 65 20 77 69 6e 64 6f | 77 2e 20 20 54 6f 20 68 |ve windo|w. To h|
|00004020| 65 6c 70 0d 23 20 77 69 | 74 68 20 74 68 65 20 6c |elp.# wi|th the l|
|00004030| 61 79 6f 75 74 20 6f 66 | 20 74 68 65 20 61 62 6f |ayout of| the abo|
|00004040| 75 74 20 77 69 6e 64 6f | 77 2c 20 49 20 70 6f 73 |ut windo|w, I pos|
|00004050| 69 74 69 6f 6e 20 74 68 | 65 20 74 65 78 74 20 77 |ition th|e text w|
|00004060| 69 74 68 69 6e 20 69 74 | 0d 23 20 62 61 73 65 64 |ithin it|.# based|
|00004070| 20 6f 6e 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 | on the |size of |
|00004080| 74 68 65 20 77 69 6e 64 | 6f 77 2e 20 20 54 68 65 |the wind|ow. The|
|00004090| 20 73 74 61 74 75 73 20 | 77 69 6e 64 6f 77 20 64 | status |window d|
|000040a0| 6f 65 73 20 74 68 69 73 | 20 74 6f 6f 2e 0d 23 20 |oes this| too..# |
|000040b0| 54 68 65 73 65 20 74 77 | 6f 20 74 68 69 6e 67 73 |These tw|o things|
|000040c0| 2c 20 74 68 65 20 52 65 | 63 74 20 72 65 73 6f 75 |, the Re|ct resou|
|000040d0| 72 63 65 20 61 6e 64 20 | 74 65 78 74 20 62 61 73 |rce and |text bas|
|000040e0| 65 64 20 6f 6e 20 74 68 | 65 20 73 69 7a 65 20 6f |ed on th|e size o|
|000040f0| 66 20 74 68 65 0d 23 20 | 77 69 6e 64 6f 77 2c 20 |f the.# |window, |
|00004100| 68 65 6c 70 20 77 68 65 | 6e 20 63 68 61 6e 67 69 |help whe|n changi|
|00004110| 6e 67 20 74 68 65 20 74 | 65 78 74 2e 20 20 49 66 |ng the t|ext. If|
|00004120| 20 74 68 65 20 6e 65 77 | 20 74 65 78 74 20 64 6f | the new| text do|
|00004130| 65 73 6e d5 74 20 66 69 | 74 2c 0d 23 20 74 68 65 |esn.t fi|t,.# the|
|00004140| 6e 20 72 65 73 69 7a 65 | 20 74 68 65 20 77 69 6e |n resize| the win|
|00004150| 64 6f 77 d5 73 20 72 65 | 73 6f 75 72 63 65 2e 20 |dow.s re|source. |
|00004160| 20 49 20 75 73 65 64 20 | 73 6f 6d 65 20 74 72 69 | I used |some tri|
|00004170| 63 6b 20 77 69 74 68 20 | 52 65 7a 20 74 6f 20 68 |ck with |Rez to h|
|00004180| 65 6c 70 0d 23 20 6c 61 | 79 6f 75 74 20 6d 79 20 |elp.# la|yout my |
|00004190| 77 69 6e 64 6f 77 20 63 | 6f 6e 74 65 6e 74 73 2e |window c|ontents.|
|000041a0| 20 20 52 65 66 65 72 20 | 74 6f 20 74 68 65 20 53 | Refer |to the S|
|000041b0| 6f 75 6e 64 41 70 70 2e | 72 20 73 6f 75 72 63 65 |oundApp.|r source|
|000041c0| 73 2e 0d 23 0d 23 20 49 | d5 76 65 20 72 65 61 64 |s..#.# I|.ve read|
|000041d0| 20 61 6e 64 20 75 6e 64 | 65 72 73 74 6f 6f 64 20 | and und|erstood |
|000041e0| 54 65 63 68 20 4e 6f 74 | 65 20 23 32 30 33 2c 20 |Tech Not|e #203, |
|000041f0| 61 6e 64 20 68 61 76 65 | 20 6c 65 61 72 6e 65 64 |and have| learned|
|00004200| 20 68 6f 77 20 74 6f 0d | 23 20 61 70 70 6c 79 20 | how to.|# apply |
|00004210| 69 74 2e 20 20 42 6f 33 | 62 20 4a 6f 68 6e 73 6f |it. Bo3|b Johnso|
|00004220| 6e 20 69 73 20 61 20 73 | 6d 61 72 74 20 67 75 79 |n is a s|mart guy|
|00004230| 2c 20 61 6e 64 20 64 65 | 76 65 6c 6f 70 65 72 73 |, and de|velopers|
|00004240| 20 73 68 6f 75 6c 64 20 | 74 72 75 73 74 0d 23 20 | should |trust.# |
|00004250| 68 69 73 20 6f 70 69 6e | 69 6f 6e 73 2e 0d 23 0d |his opin|ions..#.|
|00004260| 23 20 4c 69 73 74 20 4d | 61 6e 61 67 65 72 0d 23 |# List M|anager.#|
|00004270| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 23 20 | -------|-----.# |
|00004280| 49 74 d5 73 20 76 65 72 | 79 20 65 61 73 79 20 74 |It.s ver|y easy t|
|00004290| 6f 20 62 65 20 74 65 6d | 70 74 65 64 20 62 79 20 |o be tem|pted by |
|000042a0| 74 68 69 73 20 70 61 72 | 74 20 6f 66 20 74 68 65 |this par|t of the|
|000042b0| 20 74 6f 6f 6c 62 6f 78 | 2c 20 61 6c 6f 6e 67 20 | toolbox|, along |
|000042c0| 77 69 74 68 0d 23 20 74 | 68 65 20 44 69 61 6c 6f |with.# t|he Dialo|
|000042d0| 67 20 4d 61 6e 61 67 65 | 72 2e 20 20 54 68 65 20 |g Manage|r. The |
|000042e0| 4c 69 73 74 20 4d 61 6e | 61 67 65 72 20 69 73 20 |List Man|ager is |
|000042f0| 61 20 73 6c 6f 77 20 62 | 65 61 73 74 20 61 74 20 |a slow b|east at |
|00004300| 74 69 6d 65 73 2e 20 20 | 49 74 0d 23 20 61 6c 73 |times. |It.# als|
|00004310| 6f 20 68 61 73 20 73 6f | 6d 65 20 70 72 6f 62 6c |o has so|me probl|
|00004320| 65 6d 73 20 77 69 74 68 | 20 d2 64 6f 69 6e 67 20 |ems with| .doing |
|00004330| 74 68 65 20 72 69 67 68 | 74 20 74 68 69 6e 67 2e |the righ|t thing.|
|00004340| d3 20 20 49 d5 76 65 20 | 66 6f 75 6e 64 20 74 68 |. I.ve |found th|
|00004350| 61 74 0d 23 20 74 68 65 | 20 6c 69 73 74 20 77 69 |at.# the| list wi|
|00004360| 6c 6c 20 6e 6f 74 20 62 | 65 20 75 70 64 61 74 65 |ll not b|e update|
|00004370| 64 20 70 72 6f 70 65 72 | 6c 79 20 77 68 65 6e 20 |d proper|ly when |
|00004380| 74 68 65 20 75 73 65 72 | 20 63 6c 69 63 6b 73 20 |the user| clicks |
|00004390| 69 6e 20 61 20 63 65 6c | 6c 0d 23 20 74 68 61 74 |in a cel|l.# that|
|000043a0| 20 69 73 20 6f 75 74 20 | 6f 66 20 62 6f 75 6e 64 | is out |of bound|
|000043b0| 73 2e 20 20 4c 43 6c 69 | 63 6b 20 77 69 6c 6c 20 |s. LCli|ck will |
|000043c0| 72 65 74 75 72 6e 20 54 | 52 55 45 20 77 69 74 68 |return T|RUE with|
|000043d0| 20 61 20 63 65 6c 6c 20 | 74 68 61 74 0d 23 20 64 | a cell |that.# d|
|000043e0| 6f 65 73 6e d5 74 20 65 | 78 69 73 74 73 2e 20 20 |oesn.t e|xists. |
|000043f0| 4c 41 63 74 69 76 61 74 | 65 20 77 69 6c 6c 20 65 |LActivat|e will e|
|00004400| 72 61 73 65 20 74 68 65 | 20 73 63 72 6f 6c 6c 62 |rase the| scrollb|
|00004410| 61 72 73 20 69 6e 73 74 | 65 61 64 20 6f 66 0d 23 |ars inst|ead of.#|
|00004420| 20 68 69 67 68 6c 69 67 | 68 74 69 6e 67 20 74 68 | highlig|hting th|
|00004430| 65 20 70 72 6f 70 65 72 | 6c 79 2e 20 20 46 69 6e |e proper|ly. Fin|
|00004440| 61 6c 6c 79 2c 20 74 68 | 65 20 4c 69 73 74 20 4d |ally, th|e List M|
|00004450| 61 6e 61 67 65 72 20 64 | 6f 65 73 20 6e 6f 74 20 |anager d|oes not |
|00004460| 72 65 74 75 72 6e 0d 23 | 20 65 72 72 6f 72 73 2e |return.#| errors.|
|00004470| 20 20 48 6f 77 20 77 6f | 75 6c 64 20 61 20 70 65 | How wo|uld a pe|
|00004480| 72 73 6f 6e 20 6b 6e 6f | 77 20 69 66 20 4c 53 65 |rson kno|w if LSe|
|00004490| 74 43 65 6c 6c 20 77 6f | 72 6b 65 64 3f 0d 23 0d |tCell wo|rked?.#.|
|000044a0| 23 20 49 d5 76 65 20 72 | 65 61 64 20 61 6e 64 20 |# I.ve r|ead and |
|000044b0| 75 6e 64 65 72 73 74 6f | 6f 64 20 54 65 63 68 20 |understo|od Tech |
|000044c0| 4e 6f 74 65 20 23 32 30 | 33 2c 20 61 6e 64 20 68 |Note #20|3, and h|
|000044d0| 61 76 65 20 6c 65 61 72 | 6e 65 64 20 68 6f 77 20 |ave lear|ned how |
|000044e0| 74 6f 0d 23 20 61 70 70 | 6c 79 20 69 74 2e 0d 23 |to.# app|ly it..#|
|000044f0| 0d 23 20 52 65 73 6f 75 | 72 63 65 20 4d 61 6e 61 |.# Resou|rce Mana|
|00004500| 67 65 72 0d 23 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ger.# --|--------|
|00004510| 2d 2d 2d 2d 2d 2d 0d 23 | 20 49 20 74 65 73 74 20 |------.#| I test |
|00004520| 61 6c 6c 20 74 68 65 20 | 68 61 6e 64 6c 65 73 20 |all the |handles |
|00004530| 62 65 69 6e 67 20 72 65 | 74 75 72 6e 65 64 20 66 |being re|turned f|
|00004540| 72 6f 6d 20 74 68 65 20 | 52 65 73 6f 75 72 63 65 |rom the |Resource|
|00004550| 20 4d 61 6e 61 67 65 72 | 0d 23 20 62 65 66 6f 72 | Manager|.# befor|
|00004560| 65 20 75 73 69 6e 67 20 | 74 68 65 6d 2c 20 61 6e |e using |them, an|
|00004570| 64 20 69 66 20 49 20 67 | 65 74 20 61 20 4e 49 4c |d if I g|et a NIL|
|00004580| 20 74 68 65 6e 20 49 20 | 6c 6f 6f 6b 20 61 74 20 | then I |look at |
|00004590| 52 65 73 45 72 72 6f 72 | 2e 0d 23 20 52 65 73 45 |ResError|..# ResE|
|000045a0| 72 72 6f 72 20 73 6f 6d | 65 74 69 6d 65 73 20 6c |rror som|etimes l|
|000045b0| 69 65 73 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |ies and |returns |
|000045c0| 6e 6f 45 72 72 20 61 6e | 64 20 61 20 4e 49 4c 20 |noErr an|d a NIL |
|000045d0| 68 61 6e 64 6c 65 2e 20 | 20 52 65 73 45 72 72 6f |handle. | ResErro|
|000045e0| 72 0d 23 20 69 73 20 75 | 73 75 61 6c 6c 79 20 67 |r.# is u|sually g|
|000045f0| 6f 6f 64 20 66 6f 72 20 | 67 65 74 74 69 6e 67 20 |ood for |getting |
|00004600| 61 6e 20 65 72 72 6f 72 | 20 63 6f 64 65 20 41 46 |an error| code AF|
|00004610| 54 45 52 20 79 6f 75 d5 | 76 65 20 61 6c 72 65 61 |TER you.|ve alrea|
|00004620| 64 79 20 66 6f 75 6e 64 | 0d 23 20 61 6e 20 65 72 |dy found|.# an er|
|00004630| 72 6f 72 2e 0d 23 0d 23 | 20 4f 70 65 6e 69 6e 67 |ror..#.#| Opening|
|00004640| 20 61 20 72 65 73 6f 75 | 72 63 65 20 66 69 6c 65 | a resou|rce file|
|00004650| 20 74 68 61 74 20 69 73 | 20 61 6c 72 65 61 64 79 | that is| already|
|00004660| 20 6f 70 65 6e 20 62 79 | 20 61 6e 6f 74 68 65 72 | open by| another|
|00004670| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 0d 23 20 69 | applica|tion.# i|
|00004680| 73 20 64 61 6e 67 65 72 | 6f 75 73 2e 20 20 54 68 |s danger|ous. Th|
|00004690| 65 20 52 65 73 6f 75 72 | 63 65 20 4d 61 6e 61 67 |e Resour|ce Manag|
|000046a0| 65 72 20 77 69 6c 6c 20 | 6e 6f 74 20 74 65 6c 6c |er will |not tell|
|000046b0| 20 79 6f 75 20 77 68 65 | 6e 20 79 6f 75 d5 76 65 | you whe|n you.ve|
|000046c0| 20 64 6f 6e 65 0d 23 20 | 74 68 69 73 2e 20 20 54 | done.# |this. T|
|000046d0| 68 65 72 65 20 6e 65 65 | 64 73 20 74 6f 20 62 65 |here nee|ds to be|
|000046e0| 20 61 20 4f 70 65 6e 52 | 46 50 65 72 6d 20 74 68 | a OpenR|FPerm th|
|000046f0| 61 74 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 70 |at will |return p|
|00004700| 65 72 6d 69 73 73 69 6f | 6e 0d 23 20 65 72 72 6f |ermissio|n.# erro|
|00004710| 72 73 20 73 75 63 68 20 | 61 73 20 72 65 73 46 69 |rs such |as resFi|
|00004720| 6c 65 42 75 73 79 45 72 | 72 2e 20 20 52 65 66 65 |leBusyEr|r. Refe|
|00004730| 72 20 74 6f 20 54 65 63 | 68 20 4e 6f 74 65 20 23 |r to Tec|h Note #|
|00004740| 31 38 35 2e 0d 23 0d 23 | 20 57 68 65 6e 20 49 20 |185..#.#| When I |
|00004750| 6f 72 20 74 68 65 20 54 | 6f 6f 6c 62 6f 78 20 6e |or the T|oolbox n|
|00004760| 65 65 64 73 20 74 6f 20 | 67 65 74 20 61 74 20 6f |eeds to |get at o|
|00004770| 6e 65 20 6f 66 20 6d 79 | 20 72 65 73 6f 75 72 63 |ne of my| resourc|
|00004780| 65 73 2c 0d 23 20 43 75 | 72 52 65 73 46 69 6c 65 |es,.# Cu|rResFile|
|00004790| 20 6d 75 73 74 20 62 65 | 20 73 65 74 20 74 6f 20 | must be| set to |
|000047a0| 6d 79 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2e 20 |my appli|cation. |
|000047b0| 20 41 6c 73 6f 2c 20 6c | 6f 6f 6b 20 6f 75 74 20 | Also, l|ook out |
|000047c0| 66 6f 72 20 6f 6e 65 0d | 23 20 70 61 72 74 69 63 |for one.|# partic|
|000047d0| 75 6c 61 72 6c 79 20 6e | 61 73 74 79 20 73 69 74 |ularly n|asty sit|
|000047e0| 75 61 74 69 6f 6e 20 77 | 68 65 6e 20 73 77 69 74 |uation w|hen swit|
|000047f0| 63 68 69 6e 67 20 72 65 | 73 6f 75 72 63 65 20 66 |ching re|source f|
|00004800| 69 6c 65 73 2e 20 20 20 | 49 66 20 74 68 65 0d 23 |iles. |If the.#|
|00004810| 20 73 65 67 6d 65 6e 74 | 20 6c 6f 61 64 65 72 20 | segment| loader |
|00004820| 67 6f 65 73 20 66 6f 72 | 20 61 20 43 4f 44 45 20 |goes for| a CODE |
|00004830| 73 65 67 6d 65 6e 74 2c | 20 69 74 20 62 65 74 74 |segment,| it bett|
|00004840| 65 72 20 62 65 20 66 72 | 6f 6d 20 6f 75 72 20 72 |er be fr|om our r|
|00004850| 65 73 6f 75 72 63 65 0d | 23 20 66 69 6c 65 21 20 |esource.|# file! |
|00004860| 20 54 68 65 20 69 64 65 | 61 20 68 65 72 65 20 69 | The ide|a here i|
|00004870| 73 2c 20 69 6e 20 63 61 | 73 65 20 79 6f 75 20 64 |s, in ca|se you d|
|00004880| 69 64 6e d5 74 20 67 65 | 74 20 69 74 20 61 6c 72 |idn.t ge|t it alr|
|00004890| 65 61 64 79 2c 20 61 6c | 77 61 79 73 0d 23 20 68 |eady, al|ways.# h|
|000048a0| 61 76 65 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ave the |current |
|000048b0| 72 65 73 6f 75 72 63 65 | 20 66 69 6c 65 20 62 65 |resource| file be|
|000048c0| 20 73 65 74 20 74 6f 20 | 74 68 65 20 61 70 70 6c | set to |the appl|
|000048d0| 69 63 61 74 69 6f 6e 2e | 20 20 49 66 20 61 0d 23 |ication.| If a.#|
|000048e0| 20 72 65 73 6f 75 72 63 | 65 20 69 73 20 6e 65 65 | resourc|e is nee|
|000048f0| 64 65 64 20 66 72 6f 6d | 20 61 6e 6f 74 68 65 72 |ded from| another|
|00004900| 20 66 69 6c 65 2c 20 73 | 77 69 74 63 68 20 6d 6f | file, s|witch mo|
|00004910| 6d 65 6e 74 61 72 69 6c | 79 20 74 6f 20 67 65 74 |mentaril|y to get|
|00004920| 20 74 68 65 0d 23 20 72 | 65 73 6f 75 72 63 65 20 | the.# r|esource |
|00004930| 61 6e 64 20 69 6d 6d 65 | 64 69 61 74 65 6c 79 20 |and imme|diately |
|00004940| 72 65 73 74 6f 72 65 20 | 74 68 65 20 63 75 72 72 |restore |the curr|
|00004950| 65 6e 74 20 72 65 73 6f | 75 72 63 65 20 66 69 6c |ent reso|urce fil|
|00004960| 65 20 74 6f 20 74 68 65 | 0d 23 20 61 70 70 6c 69 |e to the|.# appli|
|00004970| 63 61 74 69 6f 6e 2e 20 | 20 49 20 74 61 6b 65 20 |cation. | I take |
|00004980| 61 6e 20 61 64 64 65 64 | 20 6d 65 61 73 75 72 65 |an added| measure|
|00004990| 20 6f 66 20 64 65 66 65 | 6e 73 65 20 61 6e 64 20 | of defe|nse and |
|000049a0| 77 68 65 6e 65 76 65 72 | 20 49 20 6e 65 65 64 20 |whenever| I need |
|000049b0| 61 0d 23 20 72 65 73 6f | 75 72 63 65 20 49 20 75 |a.# reso|urce I u|
|000049c0| 73 65 20 74 68 65 20 47 | 65 74 31 52 65 73 6f 75 |se the G|et1Resou|
|000049d0| 72 63 65 20 63 61 6c 6c | 73 2e 20 20 54 68 65 73 |rce call|s. Thes|
|000049e0| 65 20 77 69 6c 6c 20 6f | 6e 6c 79 20 73 65 61 72 |e will o|nly sear|
|000049f0| 63 68 20 74 68 65 0d 23 | 20 63 75 72 72 65 6e 74 |ch the.#| current|
|00004a00| 20 72 65 73 6f 75 72 63 | 65 20 66 69 6c 65 2e 0d | resourc|e file..|
|00004a10| 23 0d 23 20 53 74 72 61 | 74 65 67 69 65 73 20 46 |#.# Stra|tegies F|
|00004a20| 6f 72 20 53 6f 75 6e 64 | 0d 23 20 2d 2d 2d 2d 2d |or Sound|.# -----|
|00004a30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00004a40| 23 20 41 6c 6c 20 6f 66 | 20 74 68 65 20 53 6f 75 |# All of| the Sou|
|00004a50| 6e 64 20 4d 61 6e 61 67 | 65 72 20 63 6f 64 65 20 |nd Manag|er code |
|00004a60| 69 73 20 63 6f 6e 74 61 | 69 6e 65 64 20 69 6e 20 |is conta|ined in |
|00004a70| 74 68 65 20 53 6f 75 6e | 64 55 6e 69 74 2e 70 2e |the Soun|dUnit.p.|
|00004a80| 20 20 54 68 69 73 0d 23 | 20 75 6e 69 74 20 77 61 | This.#| unit wa|
|00004a90| 73 20 77 72 69 74 74 65 | 6e 20 74 6f 20 62 65 20 |s writte|n to be |
|00004aa0| 67 65 6e 65 72 61 6c 20 | 70 75 72 70 6f 73 65 2c |general |purpose,|
|00004ab0| 20 70 72 6f 76 69 64 69 | 6e 67 20 75 73 65 66 75 | providi|ng usefu|
|00004ac0| 6c 20 72 6f 75 74 69 6e | 65 73 20 66 6f 72 0d 23 |l routin|es for.#|
|00004ad0| 20 6f 74 68 65 72 20 61 | 70 70 6c 69 63 61 74 69 | other a|pplicati|
|00004ae0| 6f 6e 73 2e 20 20 4c 6f | 74 73 20 6f 66 20 65 72 |ons. Lo|ts of er|
|00004af0| 72 6f 72 20 63 68 65 63 | 6b 69 6e 67 20 69 73 20 |ror chec|king is |
|00004b00| 70 65 72 66 6f 72 6d 65 | 64 2e 20 20 49 d5 76 65 |performe|d. I.ve|
|00004b10| 20 61 6c 73 6f 0d 23 20 | 65 78 74 65 6e 64 65 64 | also.# |extended|
|00004b20| 20 74 68 65 20 73 75 70 | 70 6f 72 74 20 66 6f 72 | the sup|port for|
|00004b30| 20 53 6e 64 50 6c 61 79 | 20 61 6e 64 20 6d 61 64 | SndPlay| and mad|
|00004b40| 65 20 69 74 20 72 65 61 | 6c 6c 79 20 61 73 79 6e |e it rea|lly asyn|
|00004b50| 63 68 72 6f 6e 6f 75 73 | 2e 0d 23 20 49 d5 76 65 |chronous|..# I.ve|
|00004b60| 20 64 65 6d 6f 6e 73 74 | 72 61 74 65 64 20 6d 6f | demonst|rated mo|
|00004b70| 73 74 20 6f 66 20 74 68 | 65 20 61 62 69 6c 69 74 |st of th|e abilit|
|00004b80| 69 65 73 20 74 68 65 20 | 70 72 65 73 65 6e 74 20 |ies the |present |
|00004b90| 53 6f 75 6e 64 20 4d 61 | 6e 61 67 65 72 20 68 61 |Sound Ma|nager ha|
|00004ba0| 73 0d 23 20 74 6f 20 6f | 66 66 65 72 2e 20 20 49 |s.# to o|ffer. I|
|00004bb0| 20 77 69 6c 6c 20 68 61 | 76 65 20 74 6f 20 72 65 | will ha|ve to re|
|00004bc0| 76 69 73 65 20 74 68 65 | 20 53 6f 75 6e 64 41 70 |vise the| SoundAp|
|00004bd0| 70 55 6e 69 74 20 74 6f | 20 69 6e 63 6c 75 64 65 |pUnit to| include|
|00004be0| 20 61 6e 79 20 6e 65 77 | 0d 23 20 66 65 61 74 75 | any new|.# featu|
|00004bf0| 72 65 73 20 28 65 2e 67 | 2e 2c 20 6d 75 6c 74 69 |res (e.g|., multi|
|00004c00| 20 63 68 61 6e 6e 65 6c | 20 73 75 70 70 6f 72 74 | channel| support|
|00004c10| 29 20 77 68 65 6e 20 74 | 68 65 20 6e 65 78 74 20 |) when t|he next |
|00004c20| 53 6f 75 6e 64 20 4d 61 | 6e 61 67 65 72 20 69 73 |Sound Ma|nager is|
|00004c30| 0d 23 20 72 65 6c 65 61 | 73 65 64 2e 0d 23 0d 23 |.# relea|sed..#.#|
|00004c40| 20 49 20 61 6c 6c 6f 63 | 61 74 65 20 6d 79 20 6f | I alloc|ate my o|
|00004c50| 77 6e 20 6d 65 6d 6f 72 | 79 20 74 6f 20 62 65 20 |wn memor|y to be |
|00004c60| 75 73 65 64 20 61 73 20 | 73 6f 75 6e 64 20 63 68 |used as |sound ch|
|00004c70| 61 6e 6e 65 6c 73 2e 20 | 20 49 20 61 6c 6c 6f 63 |annels. | I alloc|
|00004c80| 61 74 65 0d 23 20 74 68 | 65 73 65 20 70 6f 69 6e |ate.# th|ese poin|
|00004c90| 74 65 72 73 20 65 61 72 | 6c 79 20 69 6e 20 74 68 |ters ear|ly in th|
|00004ca0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e d5 73 20 |e applic|ation.s |
|00004cb0| 73 74 61 72 74 75 70 20 | 74 69 6d 65 20 74 6f 20 |startup |time to |
|00004cc0| 61 76 6f 69 64 20 6d 65 | 6d 6f 72 79 0d 23 20 66 |avoid me|mory.# f|
|00004cd0| 72 61 67 6d 65 6e 74 61 | 74 69 6f 6e 2e 20 20 54 |ragmenta|tion. T|
|00004ce0| 68 65 73 65 20 63 68 61 | 6e 6e 65 6c 73 20 61 72 |hese cha|nnels ar|
|00004cf0| 65 20 6f 66 20 74 68 65 | 20 73 74 61 6e 64 61 72 |e of the| standar|
|00004d00| 64 20 73 69 7a 65 20 28 | 68 6f 6c 64 69 6e 67 20 |d size (|holding |
|00004d10| 31 32 38 0d 23 20 63 6f | 6d 6d 61 6e 64 73 29 20 |128.# co|mmands) |
|00004d20| 62 75 74 20 49 d5 76 65 | 20 65 78 74 65 6e 64 65 |but I.ve| extende|
|00004d30| 64 20 74 68 65 20 73 74 | 72 75 63 74 75 72 65 20 |d the st|ructure |
|00004d40| 74 6f 20 69 6e 63 6c 75 | 64 65 20 6d 79 20 6f 77 |to inclu|de my ow|
|00004d50| 6e 0d 23 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |n.# info|rmation.|
|00004d60| 20 20 57 68 65 6e 20 49 | 20 63 72 65 61 74 65 20 | When I| create |
|00004d70| 61 20 6e 65 77 20 73 6f | 75 6e 64 20 63 68 61 6e |a new so|und chan|
|00004d80| 6e 65 6c 2c 20 49 20 70 | 61 73 73 20 69 74 20 61 |nel, I p|ass it a|
|00004d90| 20 70 6f 69 6e 74 65 72 | 0d 23 20 74 6f 20 74 68 | pointer|.# to th|
|00004da0| 69 73 20 6d 65 6d 6f 72 | 79 2e 20 20 54 68 69 73 |is memor|y. This|
|00004db0| 20 77 69 6c 6c 20 6c 69 | 6e 6b 20 69 6e 20 74 68 | will li|nk in th|
|00004dc0| 65 20 27 73 6e 74 68 27 | 20 72 65 73 6f 75 72 63 |e 'snth'| resourc|
|00004dd0| 65 20 61 6e 64 20 68 61 | 72 64 77 61 72 65 20 74 |e and ha|rdware t|
|00004de0| 6f 0d 23 20 6d 79 20 63 | 68 61 6e 6e 65 6c 2e 20 |o.# my c|hannel. |
|00004df0| 20 57 68 65 6e 20 49 20 | 64 69 73 70 6f 73 65 20 | When I |dispose |
|00004e00| 6f 66 20 74 68 65 20 63 | 68 61 6e 6e 65 6c 2c 20 |of the c|hannel, |
|00004e10| 74 68 65 20 53 6f 75 6e | 64 20 4d 61 6e 61 67 65 |the Soun|d Manage|
|00004e20| 72 20 77 69 6c 6c 0d 23 | 20 70 75 72 67 65 20 74 |r will.#| purge t|
|00004e30| 68 69 73 20 72 65 73 6f | 75 72 63 65 20 61 6e 64 |his reso|urce and|
|00004e40| 20 64 69 73 63 6f 6e 6e | 65 63 74 20 6d 65 20 66 | disconn|ect me f|
|00004e50| 72 6f 6d 20 74 68 65 20 | 68 61 72 64 77 61 72 65 |rom the |hardware|
|00004e60| 2e 20 20 57 68 65 6e 20 | 61 64 64 69 6e 67 0d 23 |. When |adding.#|
|00004e70| 20 74 68 65 20 27 73 6e | 74 68 27 20 72 65 73 6f | the 'sn|th' reso|
|00004e80| 75 72 63 65 2c 20 74 68 | 65 20 53 6f 75 6e 64 20 |urce, th|e Sound |
|00004e90| 4d 61 6e 61 67 65 72 20 | 77 69 6c 6c 20 61 6c 6c |Manager |will all|
|00004ea0| 6f 63 61 74 65 20 61 20 | 70 6f 69 6e 74 65 72 20 |ocate a |pointer |
|00004eb0| 69 6e 74 6f 0d 23 20 74 | 68 65 20 61 70 70 6c 69 |into.# t|he appli|
|00004ec0| 63 61 74 69 6f 6e d5 73 | 20 68 65 61 70 20 69 6e |cation.s| heap in|
|00004ed0| 73 74 65 61 64 20 6f 66 | 20 74 68 65 20 73 79 73 |stead of| the sys|
|00004ee0| 74 65 6d d5 73 2e 20 20 | 54 68 69 73 20 69 73 20 |tem.s. |This is |
|00004ef0| 61 20 6d 6f 64 69 66 69 | 65 72 0d 23 20 73 74 75 |a modifi|er.# stu|
|00004f00| 62 20 75 73 65 64 20 62 | 79 20 74 68 65 20 27 73 |b used b|y the 's|
|00004f10| 6e 74 68 27 2e 20 20 54 | 68 69 73 20 63 6f 75 6c |nth'. T|his coul|
|00004f20| 64 20 63 61 75 73 65 20 | 73 6f 6d 65 20 70 72 6f |d cause |some pro|
|00004f30| 62 6c 65 6d 73 20 77 69 | 74 68 20 6d 65 6d 6f 72 |blems wi|th memor|
|00004f40| 79 0d 23 20 6d 61 6e 61 | 67 65 6d 65 6e 74 2e 20 |y.# mana|gement. |
|00004f50| 20 49 20 63 72 65 61 74 | 65 20 61 6e 64 20 64 69 | I creat|e and di|
|00004f60| 73 70 6f 73 65 20 6f 66 | 20 61 6c 6c 20 6d 79 20 |spose of| all my |
|00004f70| 63 68 61 6e 6e 65 6c 73 | 20 61 73 20 73 6f 6f 6e |channels| as soon|
|00004f80| 20 61 73 0d 23 20 70 6f | 73 73 69 62 6c 65 2c 20 | as.# po|ssible, |
|00004f90| 61 6e 64 20 74 68 69 73 | 20 64 6f 65 73 6e d5 74 |and this| doesn.t|
|00004fa0| 20 63 61 75 73 65 20 6d | 65 20 70 72 6f 62 6c 65 | cause m|e proble|
|00004fb0| 6d 73 2e 0d 23 0d 23 20 | 49 20 6b 65 65 70 20 74 |ms..#.# |I keep t|
|00004fc0| 72 61 63 6b 20 6f 66 20 | 77 68 69 63 68 20 64 6f |rack of |which do|
|00004fd0| 63 75 6d 65 6e 74 20 69 | 73 20 70 6c 61 79 69 6e |cument i|s playin|
|00004fe0| 67 20 61 20 73 6f 75 6e | 64 2c 20 61 6c 6f 6e 67 |g a soun|d, along|
|00004ff0| 20 77 69 74 68 20 61 0d | 23 20 67 6c 6f 62 61 6c | with a.|# global|
|00005000| 20 6f 66 20 77 68 65 6e | 20 74 68 65 20 61 70 70 | of when| the app|
|00005010| 6c 69 63 61 74 69 6f 6e | 20 69 73 20 70 6c 61 79 |lication| is play|
|00005020| 69 6e 67 20 73 6f 75 6e | 64 2e 20 20 49 20 6e 65 |ing soun|d. I ne|
|00005030| 65 64 65 64 20 74 6f 20 | 6b 65 65 70 0d 23 20 74 |eded to |keep.# t|
|00005040| 72 61 63 6b 20 6f 66 20 | 77 68 69 63 68 20 64 6f |rack of |which do|
|00005050| 63 75 6d 65 6e 74 20 69 | 73 20 70 6c 61 79 69 6e |cument i|s playin|
|00005060| 67 20 62 65 63 61 75 73 | 65 20 69 66 20 74 68 65 |g becaus|e if the|
|00005070| 20 75 73 65 72 20 64 69 | 73 70 6f 73 65 73 20 6f | user di|sposes o|
|00005080| 66 0d 23 20 74 68 61 74 | 20 64 6f 63 75 6d 65 6e |f.# that| documen|
|00005090| 74 2c 20 49 20 77 69 6c | 6c 20 68 61 76 65 20 74 |t, I wil|l have t|
|000050a0| 6f 20 73 74 6f 70 20 70 | 6c 61 79 69 6e 67 20 74 |o stop p|laying t|
|000050b0| 68 65 20 73 6f 75 6e 64 | 20 63 6f 6e 74 61 69 6e |he sound| contain|
|000050c0| 65 64 20 69 6e 20 69 74 | 0d 23 20 73 69 6e 63 65 |ed in it|.# since|
|000050d0| 20 74 68 65 20 75 73 65 | 72 20 77 61 6e 74 73 20 | the use|r wants |
|000050e0| 74 6f 20 64 69 73 70 6f | 73 65 20 6f 66 20 74 68 |to dispo|se of th|
|000050f0| 61 74 20 64 61 74 61 2e | 20 20 49 20 6b 65 65 70 |at data.| I keep|
|00005100| 20 74 72 61 63 6b 20 6f | 66 20 77 68 65 6e 0d 23 | track o|f when.#|
|00005110| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00005120| 20 69 73 20 70 6c 61 79 | 69 6e 67 20 73 6f 75 6e | is play|ing soun|
|00005130| 64 20 69 6e 20 61 20 67 | 6c 6f 62 61 6c 2e 20 20 |d in a g|lobal. |
|00005140| 54 68 69 73 20 69 73 20 | 6f 6e 6c 79 20 75 73 65 |This is |only use|
|00005150| 64 20 62 79 0d 23 20 74 | 68 65 20 72 6f 75 74 69 |d by.# t|he routi|
|00005160| 6e 65 20 74 68 61 74 20 | 63 61 6c 63 75 6c 61 74 |ne that |calculat|
|00005170| 65 73 20 74 68 65 20 73 | 6c 65 65 70 20 74 69 6d |es the s|leep tim|
|00005180| 65 20 66 6f 72 20 57 61 | 69 74 4e 65 78 74 45 76 |e for Wa|itNextEv|
|00005190| 65 6e 74 2e 0d 23 0d 23 | 20 49 20 63 61 6d 65 20 |ent..#.#| I came |
|000051a0| 75 70 20 77 69 74 68 20 | 61 20 70 72 65 74 74 79 |up with |a pretty|
|000051b0| 20 73 69 63 6b 20 6d 75 | 73 69 63 20 6e 6f 74 61 | sick mu|sic nota|
|000051c0| 74 69 6f 6e 61 6c 20 73 | 79 73 74 65 6d 20 75 73 |tional s|ystem us|
|000051d0| 69 6e 67 20 52 65 7a 2e | 0d 23 20 52 65 66 65 72 |ing Rez.|.# Refer|
|000051e0| 20 74 6f 20 74 68 65 20 | 6e 6f 74 65 73 20 69 6e | to the |notes in|
|000051f0| 20 74 68 65 20 53 6f 75 | 6e 64 41 70 70 53 6e 64 | the Sou|ndAppSnd|
|00005200| 73 2e 72 20 66 69 6c 65 | 2e 20 20 49 66 20 79 6f |s.r file|. If yo|
|00005210| 75 d5 76 65 20 6a 75 73 | 74 0d 23 20 66 69 6e 69 |u.ve jus|t.# fini|
|00005220| 73 68 65 64 20 61 20 6d | 65 61 6c 2c 20 77 61 69 |shed a m|eal, wai|
|00005230| 74 20 66 6f 75 72 20 68 | 6f 75 72 73 20 62 65 66 |t four h|ours bef|
|00005240| 6f 72 65 20 72 65 61 64 | 69 6e 67 2e 0d 23 0d 23 |ore read|ing..#.#|
|00005250| 20 54 68 65 20 53 6f 75 | 6e 64 55 6e 69 74 20 68 | The Sou|ndUnit h|
|00005260| 61 6e 64 6c 65 73 20 61 | 6c 6c 20 6f 66 20 74 68 |andles a|ll of th|
|00005270| 65 20 53 6f 75 6e 64 20 | 4d 61 6e 61 67 65 72 20 |e Sound |Manager |
|00005280| 63 6f 64 65 20 65 6e 74 | 69 72 65 6c 79 2e 20 20 |code ent|irely. |
|00005290| 54 68 69 73 0d 23 20 65 | 6c 69 6d 69 6e 61 74 65 |This.# e|liminate|
|000052a0| 73 20 61 6e 79 20 61 6e | 64 20 61 6c 6c 20 72 65 |s any an|d all re|
|000052b0| 66 65 72 65 6e 63 65 73 | 20 74 6f 20 74 68 65 20 |ferences| to the |
|000052c0| 53 6f 75 6e 64 20 4d 61 | 6e 61 67 65 72 20 66 72 |Sound Ma|nager fr|
|000052d0| 6f 6d 20 74 68 65 0d 23 | 20 61 70 70 6c 69 63 61 |om the.#| applica|
|000052e0| 74 69 6f 6e 2e 20 20 54 | 68 65 20 53 6f 75 6e 64 |tion. T|he Sound|
|000052f0| 55 6e 69 74 20 77 69 6c | 6c 20 72 65 74 75 72 6e |Unit wil|l return|
|00005300| 20 61 6e 79 20 65 72 72 | 6f 72 20 65 6e 63 6f 75 | any err|or encou|
|00005310| 6e 74 65 72 65 64 20 77 | 68 69 6c 65 0d 23 20 63 |ntered w|hile.# c|
|00005320| 61 6c 6c 69 6e 67 20 74 | 68 65 20 53 6f 75 6e 64 |alling t|he Sound|
|00005330| 20 4d 61 6e 61 67 65 72 | 2c 20 61 6e 64 20 64 6f | Manager|, and do|
|00005340| 65 73 20 73 6f 6d 65 20 | 65 78 74 72 61 20 65 72 |es some |extra er|
|00005350| 72 6f 72 20 63 68 65 63 | 6b 69 6e 67 20 74 68 65 |ror chec|king the|
|00005360| 0d 23 20 53 6f 75 6e 64 | 20 4d 61 6e 61 67 65 72 |.# Sound| Manager|
|00005370| 20 64 6f 65 73 6e d5 74 | 20 64 6f 2e 0d 23 0d 23 | doesn.t| do..#.#|
|00005380| 20 54 68 65 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 | The por|tion of |
|00005390| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|000053a0| 74 68 61 74 20 75 73 65 | 73 20 74 68 65 20 77 61 |that use|s the wa|
|000053b0| 76 65 20 74 61 62 6c 65 | 20 73 79 6e 74 68 65 73 |ve table| synthes|
|000053c0| 69 7a 65 72 0d 23 20 69 | 73 20 6d 6f 72 65 20 63 |izer.# i|s more c|
|000053d0| 6f 6d 70 6c 65 78 20 74 | 68 61 6e 20 74 68 65 20 |omplex t|han the |
|000053e0| 6f 74 68 65 72 20 74 77 | 6f 2e 20 20 49 20 77 61 |other tw|o. I wa|
|000053f0| 6e 74 65 64 20 74 6f 20 | 69 6e 63 6c 75 64 65 20 |nted to |include |
|00005400| 61 6e 20 65 78 61 6d 70 | 6c 65 0d 23 20 63 68 61 |an examp|le.# cha|
|00005410| 6e 6e 65 6c 20 6d 6f 64 | 69 66 69 65 72 20 66 6f |nnel mod|ifier fo|
|00005420| 72 20 75 73 65 20 69 6e | 20 74 68 65 20 77 61 76 |r use in| the wav|
|00005430| 65 20 74 61 62 6c 65 20 | 63 68 61 6e 6e 65 6c 73 |e table |channels|
|00005440| 2e 20 20 54 68 69 73 20 | 77 6f 75 6c 64 20 68 61 |. This |would ha|
|00005450| 76 65 0d 23 20 62 65 65 | 6e 20 61 20 74 72 61 6e |ve.# bee|n a tran|
|00005460| 73 70 6f 73 69 74 69 6f | 6e 61 6c 20 6d 6f 64 69 |spositio|nal modi|
|00005470| 66 69 65 72 20 74 68 61 | 74 20 77 6f 75 6c 64 20 |fier tha|t would |
|00005480| 74 61 6b 65 20 61 20 67 | 69 76 65 6e 20 6e 6f 74 |take a g|iven not|
|00005490| 65 43 6d 64 20 61 6e 64 | 0d 23 20 74 72 61 6e 73 |eCmd and|.# trans|
|000054a0| 70 6f 73 65 20 69 74 20 | 62 79 20 73 6f 6d 65 20 |pose it |by some |
|000054b0| 61 6d 6f 75 6e 74 2e 20 | 20 54 68 69 73 20 77 6f |amount. | This wo|
|000054c0| 75 6c 64 20 62 65 20 6e | 69 63 65 20 66 6f 72 20 |uld be n|ice for |
|000054d0| 74 68 65 20 72 6f 75 74 | 69 6e 65 20 74 68 61 74 |the rout|ine that|
|000054e0| 0d 23 20 70 6c 61 79 73 | 20 61 20 73 63 61 6c 65 |.# plays| a scale|
|000054f0| 2c 20 62 79 20 61 6c 6c | 6f 77 69 6e 67 20 74 68 |, by all|owing th|
|00005500| 65 20 6f 74 68 65 72 20 | 74 68 72 65 65 20 63 68 |e other |three ch|
|00005510| 61 6e 6e 65 6c 73 20 74 | 6f 20 62 65 20 70 6c 61 |annels t|o be pla|
|00005520| 79 69 6e 67 20 74 68 65 | 0d 23 20 73 61 6d 65 20 |ying the|.# same |
|00005530| 73 63 61 6c 65 20 62 75 | 74 20 61 74 20 61 20 64 |scale bu|t at a d|
|00005540| 69 66 66 65 72 65 6e 74 | 20 69 6e 74 65 72 76 61 |ifferent| interva|
|00005550| 6c 2e 20 20 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |l. Unfo|rtunatel|
|00005560| 79 2c 20 49 20 66 6f 75 | 6e 64 20 74 68 61 74 0d |y, I fou|nd that.|
|00005570| 23 20 74 68 65 20 53 6f | 75 6e 64 20 4d 61 6e 61 |# the So|und Mana|
|00005580| 67 65 72 20 68 61 73 20 | 62 75 67 73 20 75 73 69 |ger has |bugs usi|
|00005590| 6e 67 20 61 20 6d 6f 64 | 69 66 69 65 72 2c 20 61 |ng a mod|ifier, a|
|000055a0| 74 20 6c 65 61 73 74 20 | 77 69 74 68 20 74 68 65 |t least |with the|
|000055b0| 20 77 61 76 65 0d 23 20 | 74 61 62 6c 65 20 73 79 | wave.# |table sy|
|000055c0| 6e 74 68 73 2c 20 61 6e | 64 20 63 6f 75 6c 64 20 |nths, an|d could |
|000055d0| 6e 6f 74 20 75 73 65 20 | 74 68 65 6d 2e 0d 23 0d |not use |them..#.|
|000055e0| 23 20 49 d5 76 65 20 63 | 72 65 61 74 65 64 20 61 |# I.ve c|reated a|
|000055f0| 20 66 65 77 20 77 61 76 | 65 20 74 61 62 6c 65 20 | few wav|e table |
|00005600| 73 6f 75 6e 64 73 20 61 | 6e 64 20 6b 65 65 70 20 |sounds a|nd keep |
|00005610| 74 68 65 6d 20 69 6e 20 | 61 20 27 73 6e 64 20 27 |them in |a 'snd '|
|00005620| 0d 23 20 72 65 73 6f 75 | 72 63 65 2e 20 20 54 68 |.# resou|rce. Th|
|00005630| 69 73 20 61 6c 6c 6f 77 | 73 20 6d 65 20 74 6f 20 |is allow|s me to |
|00005640| 63 68 61 6e 67 65 20 74 | 68 65 20 73 6f 75 6e 64 |change t|he sound|
|00005650| 20 6f 66 20 74 68 65 20 | 77 61 76 65 20 74 61 62 | of the |wave tab|
|00005660| 6c 65 0d 23 20 63 68 61 | 6e 6e 65 6c 73 20 61 6e |le.# cha|nnels an|
|00005670| 64 20 6e 6f 74 20 63 68 | 61 6e 67 65 20 61 6e 79 |d not ch|ange any|
|00005680| 20 6f 66 20 74 68 65 20 | 63 6f 64 65 2e 20 20 43 | of the |code. C|
|00005690| 72 65 61 74 69 6e 67 20 | 77 61 76 65 20 74 61 62 |reating |wave tab|
|000056a0| 6c 65 20 64 61 74 61 20 | 69 73 0d 23 20 63 6f 6d |le data |is.# com|
|000056b0| 70 6c 69 63 61 74 65 64 | 2e 20 20 54 68 65 20 65 |plicated|. The e|
|000056c0| 78 61 6d 70 6c 65 20 73 | 6f 75 6e 64 73 20 49 d5 |xample s|ounds I.|
|000056d0| 76 65 20 69 6e 63 6c 75 | 64 65 64 20 61 72 65 20 |ve inclu|ded are |
|000056e0| 73 61 6d 70 6c 65 73 20 | 49 d5 76 65 20 74 61 6b |samples |I.ve tak|
|000056f0| 65 6e 0d 23 20 66 72 6f | 6d 20 76 61 72 69 6f 75 |en.# fro|m variou|
|00005700| 73 20 73 6f 75 72 63 65 | 73 2e 20 20 49 d5 76 65 |s source|s. I.ve|
|00005710| 20 63 6c 65 61 6e 65 64 | 20 74 68 65 6d 20 75 70 | cleaned| them up|
|00005720| 20 71 75 69 74 20 61 20 | 62 69 74 2e 20 20 54 68 | quit a |bit. Th|
|00005730| 69 73 20 77 61 73 20 74 | 6f 0d 23 20 73 65 74 20 |is was t|o.# set |
|00005740| 6c 6f 6f 70 20 70 6f 69 | 6e 74 73 2c 20 74 72 79 |loop poi|nts, try|
|00005750| 20 61 6e 64 20 72 65 64 | 75 63 65 20 63 6c 69 63 | and red|uce clic|
|00005760| 6b 73 2c 20 63 6f 72 72 | 65 63 74 20 74 68 65 20 |ks, corr|ect the |
|00005770| 73 61 6d 70 6c 65 20 72 | 61 74 65 73 2c 20 61 6e |sample r|ates, an|
|00005780| 64 0d 23 20 62 61 73 65 | 20 6e 6f 74 65 73 2e 20 |d.# base| notes. |
|00005790| 20 54 68 69 73 20 69 73 | 20 61 6c 73 6f 20 61 20 | This is| also a |
|000057a0| 63 6f 6d 70 6c 69 63 61 | 74 65 64 20 74 61 73 6b |complica|ted task|
|000057b0| 2e 20 20 4d 61 79 62 65 | 20 49 20 73 68 6f 75 6c |. Maybe| I shoul|
|000057c0| 64 20 64 6f 63 75 6d 65 | 6e 74 0d 23 20 74 68 65 |d docume|nt.# the|
|000057d0| 73 65 20 74 65 63 68 6e | 69 71 75 65 73 2e 0d 23 |se techn|iques..#|
|000057e0| 0d 23 20 4a 69 6d 20 52 | 65 65 6b 65 73 20 45 2e |.# Jim R|eekes E.|
|000057f0| 4f 2e 2c 20 4d 61 63 69 | 6e 74 6f 73 68 20 44 65 |O., Maci|ntosh De|
|00005800| 76 65 6c 6f 70 65 72 20 | 54 65 63 68 6e 69 63 61 |veloper |Technica|
|00005810| 6c 20 53 75 70 70 6f 72 | 74 0d 23 20 54 75 65 73 |l Suppor|t.# Tues|
|00005820| 64 61 79 2c 20 4a 61 6e | 75 61 72 79 20 33 30 2c |day, Jan|uary 30,|
|00005830| 20 31 39 39 30 20 20 31 | 3a 30 31 20 50 4d 0d 23 | 1990 1|:01 PM.#|
|00005840| 0d 23 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |.#~~~~~~|~~~~~~~~|
|00005850| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005860| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005870| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005880| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7d 0d 0d 7b |~~~~~~~~|~~~~}..{|
|00005890| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000058a0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000058b0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000058c0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|000058d0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7d 0d 50 52 4f 47 |~~~~~~~~|~~}.PROG|
|000058e0| 52 41 4d 20 53 6f 75 6e | 64 41 70 70 3b 0d 7b 7e |RAM Soun|dApp;.{~|
|000058f0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005900| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005910| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005920| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005930| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7d 0d 0d 7b 49 d5 6d |~~~~~~~~|~}..{I.m|
|00005940| 20 70 75 72 70 6f 73 65 | 6c 79 20 61 76 6f 69 64 | purpose|ly avoid|
|00005950| 69 6e 67 20 74 68 65 20 | 75 73 65 20 6f 66 20 74 |ing the |use of t|
|00005960| 68 65 20 69 6e 74 65 72 | 66 61 63 65 20 66 69 6c |he inter|face fil|
|00005970| 65 73 20 4f 53 49 6e 74 | 46 20 61 6e 64 20 50 61 |es OSInt|F and Pa|
|00005980| 63 6b 49 6e 74 66 2e 0d | 20 54 68 65 73 65 20 74 |ckIntf..| These t|
|00005990| 77 6f 20 66 69 6c 65 73 | 20 69 6e 63 6c 75 64 65 |wo files| include|
|000059a0| 20 6c 6f 74 73 20 6f 66 | 20 6f 74 68 65 72 73 2c | lots of| others,|
|000059b0| 20 73 6f 6d 65 20 6f 66 | 20 77 68 69 63 68 20 49 | some of| which I|
|000059c0| 20 64 6f 6e d5 74 20 6e | 65 65 64 2e 0d 20 42 79 | don.t n|eed.. By|
|000059d0| 20 61 76 6f 69 64 69 6e | 67 20 74 68 65 20 75 73 | avoidin|g the us|
|000059e0| 65 20 6f 66 20 74 68 65 | 73 65 20 66 69 6c 65 73 |e of the|se files|
|000059f0| 2c 20 63 6f 6d 70 69 6c | 65 20 74 69 6d 65 73 20 |, compil|e times |
|00005a00| 61 72 65 20 66 61 73 74 | 65 72 2e 20 20 49 74 20 |are fast|er. It |
|00005a10| 68 65 6c 70 73 0d 20 63 | 75 74 20 64 6f 77 6e 20 |helps. c|ut down |
|00005a20| 6f 6e 20 74 68 65 20 73 | 79 6d 62 6f 6c 20 74 61 |on the s|ymbol ta|
|00005a30| 62 6c 65 20 74 68 72 61 | 73 68 69 6e 67 20 62 79 |ble thra|shing by|
|00005a40| 20 6c 6f 61 64 69 6e 67 | 20 75 6e 6e 65 63 65 73 | loading| unneces|
|00005a50| 73 61 72 79 20 66 69 6c | 65 73 2e 0d 20 41 6e 79 |sary fil|es.. Any|
|00005a60| 74 68 69 6e 67 20 74 6f | 20 68 65 6c 70 20 4d 50 |thing to| help MP|
|00005a70| 57 20 67 6f 20 66 61 73 | 74 65 72 21 20 20 49 20 |W go fas|ter! I |
|00005a80| 63 6f 75 6c 64 20 61 6c | 73 6f 20 61 76 6f 69 64 |could al|so avoid|
|00005a90| 20 54 6f 6f 6c 49 6e 74 | 66 2c 20 62 75 74 20 69 | ToolInt|f, but i|
|00005aa0| 6e 20 6d 79 0d 20 61 70 | 70 6c 69 63 61 74 69 6f |n my. ap|plicatio|
|00005ab0| 6e 20 49 d5 6d 20 75 73 | 69 6e 67 20 61 6c 6c 20 |n I.m us|ing all |
|00005ac0| 6f 66 20 74 68 65 20 66 | 69 6c 65 73 20 69 74 20 |of the f|iles it |
|00005ad0| 69 6e 63 6c 75 64 65 73 | 2e 7d 0d 0d 7b 7e 7e 7e |includes|.}..{~~~|
|00005ae0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005af0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b00| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b10| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b20| 7e 7e 7e 7e 7e 7e 7e 7d | 0d 55 53 45 53 0d 7b 7e |~~~~~~~}|.USES.{~|
|00005b30| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b40| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b50| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b60| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005b70| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7d 0d 09 54 79 70 65 |~~~~~~~~|~}..Type|
|00005b80| 73 2c 20 51 75 69 63 6b | 44 72 61 77 2c 20 54 72 |s, Quick|Draw, Tr|
|00005b90| 61 70 73 2c 20 54 6f 6f | 6c 49 6e 74 66 2c 20 46 |aps, Too|lIntf, F|
|00005ba0| 69 6c 65 73 2c 20 53 65 | 67 4c 6f 61 64 2c 20 50 |iles, Se|gLoad, P|
|00005bb0| 61 63 6b 61 67 65 73 2c | 20 4d 65 6e 75 73 2c 0d |ackages,| Menus,.|
|00005bc0| 09 4f 53 45 76 65 6e 74 | 73 2c 20 44 69 73 6b 49 |.OSEvent|s, DiskI|
|00005bd0| 6e 69 74 2c 20 53 79 73 | 45 71 75 2c 20 53 63 72 |nit, Sys|Equ, Scr|
|00005be0| 69 70 74 2c 20 45 72 72 | 6f 72 73 2c 20 43 75 72 |ipt, Err|ors, Cur|
|00005bf0| 73 6f 72 43 74 6c 2c 20 | 53 6f 75 6e 64 2c 20 53 |sorCtl, |Sound, S|
|00005c00| 6f 75 6e 64 55 6e 69 74 | 3b 0d 0d 7b 7e 7e 7e 7e |oundUnit|;..{~~~~|
|00005c10| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c20| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c30| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c40| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c50| 7e 7e 7e 7e 7e 7e 7d 0d | 43 4f 4e 53 54 0d 7b 7e |~~~~~~}.|CONST.{~|
|00005c60| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c70| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c80| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005c90| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~|~~~~~~~~|
|00005ca0| 7e 7e 7e 7e 7e 7e 7e 7e | 7e 7d 0d 09 6b 53 79 73 |~~~~~~~~|~}..kSys|
|00005cb0| 45 6e 76 69 72 6f 6e 73 | 56 65 72 73 69 6f 6e 20 |Environs|Version |
|00005cc0| 3d 09 31 3b 09 09 7b 56 | 65 72 73 69 6f 6e 20 6f |=.1;..{V|ersion o|
|00005cd0| 66 20 74 68 65 20 53 79 | 73 45 6e 76 52 65 63 20 |f the Sy|sEnvRec |
|00005ce0| 49 20 75 6e 64 65 72 73 | 74 61 6e 64 2e 7d 0d 09 |I unders|tand.}..|
|00005cf0| 6b 53 79 73 74 65 6d 36 | 30 32 20 3d 09 09 09 24 |kSystem6|02 =...$|
|00005d00| 30 36 30 32 3b 09 7b 53 | 79 73 45 6e 76 52 65 63 |0602;.{S|ysEnvRec|
|00005d10| 20 76 61 6c 75 65 20 66 | 6f 72 20 53 79 73 74 65 | value f|or Syste|
|00005d20| 6d 20 76 65 72 73 69 6f | 6e 20 36 2e 30 2e 32 7d |m versio|n 6.0.2}|
|00005d30| 0d 09 6b 50 6f 6c 6c 69 | 6e 67 53 6c 65 65 70 54 |..kPolli|ngSleepT|
|00005d40| 69 6d 65 20 3d 09 36 30 | 3b 09 09 7b 4d 75 6c 74 |ime =.60|;..{Mult|
|00005d50| 69 46 69 6e 64 65 72 d5 | 73 20 73 6c 65 65 70 20 |iFinder.|s sleep |
|00005d60| 77 68 69 6c 65 20 73 6f | 75 6e 64 20 69 73 20 70 |while so|und is p|
|00005d70| 6c 61 79 69 6e 67 7d 0d | 0d 09 6b 4e 75 6d 62 65 |laying}.|..kNumbe|
|00005d80| 72 4f 66 4d 61 73 74 65 | 72 73 20 3d 20 09 33 3b |rOfMaste|rs = .3;|
|00005d90| 09 09 09 7b 6e 75 6d 62 | 65 72 20 6f 66 20 6d 61 |...{numb|er of ma|
|00005da0| 73 74 65 72 20 70 6f 69 | 6e 74 65 72 20 62 6c 6f |ster poi|nter blo|
|00005db0| 63 6b 73 20 77 65 20 65 | 78 70 65 63 74 7d 0d 09 |cks we e|xpect}..|
|00005dc0| 6b 53 69 7a 65 4f 66 52 | 65 73 65 72 76 65 20 3d |kSizeOfR|eserve =|
|00005dd0| 09 09 33 32 20 2a 20 31 | 30 32 34 3b 20 7b 73 69 |..32 * 1|024; {si|
|00005de0| 7a 65 20 6f 66 20 72 65 | 73 65 72 76 65 20 6d 65 |ze of re|serve me|
|00005df0| 6d 6f 72 79 20 66 6f 72 | 20 67 72 6f 77 20 7a 6f |mory for| grow zo|
|00005e00| 6e 65 20 70 72 6f 63 7d | 0d 09 6b 4d 69 6e 53 70 |ne proc}|..kMinSp|
|00005e10| 61 63 65 20 3d 09 09 09 | 09 33 32 20 2a 20 31 30 |ace =...|.32 * 10|
|00005e20| 32 34 3b 20 7b 6d 69 6e | 69 6d 75 6d 20 61 76 61 |24; {min|imum ava|
|00005e30| 69 6c 61 62 6c 65 20 6d | 65 6d 6f 72 79 20 49 20 |ilable m|emory I |
|00005e40| 61 6c 6c 6f 77 20 69 6e | 20 68 65 61 70 7d 0d 09 |allow in| heap}..|
|00005e50| 6b 4d 65 6d 46 6f 72 53 | 6e 64 44 6f 63 20 3d 09 |kMemForS|ndDoc =.|
|00005e60| 09 32 30 20 2a 20 31 30 | 32 34 3b 20 7b 6d 69 6e |.20 * 10|24; {min|
|00005e70| 69 6d 61 6c 20 61 6d 6f | 75 6e 74 20 6f 66 20 6d |imal amo|unt of m|
|00005e80| 65 6d 6f 72 79 20 6e 65 | 65 64 65 64 20 62 79 20 |emory ne|eded by |
|00005e90| 64 6f 63 75 6d 65 6e 74 | 7d 0d 0d 09 6b 53 63 72 |document|}...kScr|
|00005ea0| 6f 6c 6c 42 61 72 57 69 | 64 74 68 20 3d 09 09 31 |ollBarWi|dth =..1|
|00005eb0| 35 3b 09 09 7b 74 68 65 | 20 77 69 64 74 68 20 6f |5;..{the| width o|
|00005ec0| 66 20 74 68 65 20 73 63 | 72 6f 6c 6c 62 61 72 20 |f the sc|rollbar |
|00005ed0| 69 6e 20 74 68 65 20 6c | 69 73 74 7d 0d 09 6b 4c |in the l|ist}..kL|
|00005ee0| 69 73 74 46 72 61 6d 65 | 49 6e 73 65 74 20 3d 09 |istFrame|Inset =.|
|00005ef0| 09 2d 31 3b 09 09 7b 69 | 6e 73 65 74 20 72 65 63 |.-1;..{i|nset rec|
|00005f00| 74 61 6e 67 6c 65 20 61 | 64 6a 75 73 74 6d 65 6e |tangle a|djustmen|
|00005f10| 74 20 66 6f 72 20 6c 69 | 73 74 20 66 72 61 6d 65 |t for li|st frame|
|00005f20| 7d 0d 09 6b 4d 73 67 49 | 6e 73 65 74 20 20 3d 09 |}..kMsgI|nset =.|
|00005f30| 09 09 38 3b 09 09 09 7b | 69 6e 73 65 74 20 72 65 |..8;...{|inset re|
|00005f40| 63 74 61 6e 67 6c 65 20 | 61 64 6a 75 73 74 6d 65 |ctangle |adjustme|
|00005f50| 6e 74 20 66 6f 72 20 6d | 65 73 73 61 67 65 73 7d |nt for m|essages}|
|00005f60| 0d 0d 09 6b 53 46 54 6f | 70 20 3d 09 09 09 09 09 |...kSFTo|p =.....|
|00005f70| 34 30 3b 09 09 7b 74 6f | 70 20 6f 66 20 53 74 61 |40;..{to|p of Sta|
|00005f80| 6e 64 61 72 64 20 46 69 | 6c 65 20 61 6e 64 20 44 |ndard Fi|le and D|
|00005f90| 49 42 61 64 4d 6f 75 6e | 74 20 64 69 61 6c 6f 67 |IBadMoun|t dialog|
|00005fa0| 7d 0d 09 6b 53 46 4c 65 | 66 74 20 3d 09 09 09 09 |}..kSFLe|ft =....|
|00005fb0| 35 30 3b 09 09 7b 6c 65 | 66 74 20 6f 66 20 53 74 |50;..{le|ft of St|
|00005fc0| 61 6e 64 61 72 64 20 46 | 69 6c 65 20 61 6e 64 20 |andard F|ile and |
|00005fd0| 44 49 42 61 64 4d 6f 75 | 6e 74 20 64 69 61 6c 6f |DIBadMou|nt dialo|
|00005fe0| 67 7d 0d 0d 09 6b 43 6e | 74 6c 41 63 74 69 76 61 |g}...kCn|tlActiva|
|00005ff0| 74 65 20 3d 09 09 30 3b | 09 09 09 7b 65 6e 61 62 |te =..0;|...{enab|
|00006000| 6c 65 64 20 63 6f 6e 74 | 72 6f 6c d5 73 20 68 69 |led cont|rol.s hi|
|00006010| 6c 69 74 65 20 73 74 61 | 74 65 7d 0d 09 6b 43 6e |lite sta|te}..kCn|
|00006020| 74 6c 44 65 61 63 74 69 | 76 61 74 65 20 3d 09 09 |tlDeacti|vate =..|
|00006030| 32 35 35 3b 09 09 7b 64 | 69 73 61 62 6c 65 64 20 |255;..{d|isabled |
|00006040| 63 6f 6e 74 72 6f 6c d5 | 73 20 68 69 6c 69 74 65 |control.|s hilite|
|00006050| 20 73 74 61 74 65 7d 0d | 09 6b 53 65 6c 65 63 74 | state}.|.kSelect|
|00006060| 20 3d 09 09 09 09 31 3b | 09 09 09 7b 73 65 6c 65 | =....1;|...{sele|
|00006070| 63 74 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 7d 0d |ct the c|ontrol}.|
|00006080| 09 6b 44 65 73 65 6c 65 | 63 74 20 3d 09 09 09 09 |.kDesele|ct =....|
|00006090| 30 3b 09 09 09 7b 64 65 | 73 65 6c 65 63 74 20 74 |0;...{de|select t|
|000060a0| 68 65 20 63 6f 6e 74 72 | 6f 6c 7d 0d 09 6b 43 6e |he contr|ol}..kCn|
|000060b0| 74 6c 4f 6e 20 3d 09 09 | 09 09 31 3b 09 09 09 7b |tlOn =..|..1;...{|
|000060c0| 63 6f 6e 74 72 6f 6c d5 | 73 20 76 61 6c 75 65 20 |control.|s value |
|000060d0| 77 68 65 6e 20 74 72 75 | 6e 65 64 20 6f 6e 7d 0d |when tru|ned on}.|
|000060e0| 09 6b 43 6e 74 6c 4f 66 | 66 20 3d 09 09 09 09 30 |.kCntlOf|f =....0|
|000060f0| 3b 09 09 09 7b 63 6f 6e | 74 72 6f 6c d5 73 20 76 |;...{con|trol.s v|
|00006100| 61 6c 75 65 20 77 68 65 | 6e 20 74 72 75 6e 65 64 |alue whe|n truned|
|00006110| 20 6f 66 66 7d 0d 0d 09 | 6b 42 75 74 74 6f 6e 46 | off}...|kButtonF|
|00006120| 72 61 6d 65 53 69 7a 65 | 20 3d 09 33 3b 09 09 09 |rameSize| =.3;...|
|00006130| 7b 62 75 74 74 6f 6e d5 | 73 20 66 72 61 6d 65 20 |{button.|s frame |
|00006140| 70 65 6e 20 73 69 7a 65 | 7d 0d 09 6b 42 75 74 74 |pen size|}..kButt|
|00006150| 6f 6e 46 72 61 6d 65 49 | 6e 73 65 74 20 3d 09 2d |onFrameI|nset =.-|
|00006160| 34 3b 09 09 7b 69 6e 73 | 65 74 20 72 65 63 74 61 |4;..{ins|et recta|
|00006170| 6e 67 6c 65 20 61 64 6a | 75 73 74 6d 65 6e 74 20 |ngle adj|ustment |
|00006180| 61 72 6f 75 6e 64 20 62 | 75 74 74 6f 6e 7d 0d 09 |around b|utton}..|
|00006190| 6b 42 75 74 74 6f 6e 53 | 69 7a 65 48 20 3d 09 09 |kButtonS|izeH =..|
|000061a0| 09 31 37 3b 09 09 7b 73 | 74 61 6e 64 61 72 64 20 |.17;..{s|tandard |
|000061b0| 68 65 69 67 68 74 20 6f | 66 20 62 75 74 74 6f 6e |height o|f button|
|000061c0| 73 7d 0d 09 6b 44 61 66 | 61 75 6c 74 42 75 74 53 |s}..kDaf|aultButS|
|000061d0| 69 7a 65 48 20 3d 20 09 | 6b 42 75 74 74 6f 6e 53 |izeH = .|kButtonS|
|000061e0| 69 7a 65 48 20 2d 20 6b | 42 75 74 74 6f 6e 46 72 |izeH - k|ButtonFr|
|000061f0| 61 6d 65 49 6e 73 65 74 | 20 2d 20 6b 42 75 74 74 |ameInset| - kButt|
|00006200| 6f 6e 46 72 61 6d 65 49 | 6e 73 65 74 3b 0d 0d 09 |onFrameI|nset;...|
|00006210| 6b 49 63 6f 6e 54 6f 70 | 20 3d 09 09 09 09 31 30 |kIconTop| =....10|
|00006220| 3b 09 09 7b 73 74 61 6e | 64 61 72 64 20 70 6f 73 |;..{stan|dard pos|
|00006230| 69 74 69 6f 6e 20 66 6f | 72 20 69 63 6f 6e 73 20 |ition fo|r icons |
|00006240| 69 6e 20 61 6c 65 72 74 | 73 7d 0d 09 6b 49 63 6f |in alert|s}..kIco|
|00006250| 6e 4c 65 66 74 20 3d 09 | 09 09 09 32 30 3b 0d 09 |nLeft =.|...20;..|
|00006260| 6b 49 63 6f 6e 42 6f 74 | 20 3d 09 09 09 09 34 32 |kIconBot| =....42|
|00006270| 3b 0d 09 6b 49 63 6f 6e | 52 69 67 68 74 20 3d 09 |;..kIcon|Right =.|
|00006280| 09 09 35 32 3b 0d 09 6b | 49 63 6f 6e 50 69 63 74 |..52;..k|IconPict|
|00006290| 47 61 70 20 3d 09 09 09 | 38 3b 09 09 09 7b 70 69 |Gap =...|8;...{pi|
|000062a0| 63 74 20 73 70 61 63 69 | 6e 67 20 69 6e 20 61 62 |ct spaci|ng in ab|
|000062b0| 6f 75 74 20 77 69 6e 64 | 6f 77 7d 0d 0d 09 6b 46 |out wind|ow}...kF|
|000062c0| 53 41 73 79 6e 63 68 20 | 3d 09 09 09 09 54 52 55 |SAsynch |=....TRU|
|000062d0| 45 3b 09 09 7b 61 73 79 | 6e 63 68 72 6f 6e 6f 75 |E;..{asy|nchronou|
|000062e0| 73 20 46 69 6c 65 20 4d | 61 6e 61 67 65 72 20 63 |s File M|anager c|
|000062f0| 61 6c 6c 7d 0d 0d 09 6b | 45 6e 74 65 72 4b 65 79 |all}...k|EnterKey|
|00006300| 20 3d 09 09 09 09 43 48 | 52 28 24 30 33 29 3b 20 | =....CH|R($03); |
|00006310| 7b 74 68 65 20 6b 65 79 | 73 20 49 d5 6d 20 6c 6f |{the key|s I.m lo|
|00006320| 6f 6b 69 6e 67 20 66 6f | 72 7d 0d 09 6b 52 65 74 |oking fo|r}..kRet|
|00006330| 75 72 6e 4b 65 79 20 3d | 09 09 09 43 48 52 28 24 |urnKey =|...CHR($|
|00006340| 30 44 29 3b 0d 09 6b 45 | 73 63 61 70 65 20 3d 09 |0D);..kE|scape =.|
|00006350| 09 09 09 43 48 52 28 24 | 31 42 29 3b 0d 09 6b 55 |...CHR($|1B);..kU|
|00006360| 70 41 72 72 6f 77 20 3d | 09 09 09 09 43 48 52 28 |pArrow =|....CHR(|
|00006370| 24 31 45 29 3b 0d 09 6b | 44 6f 77 6e 41 72 72 6f |$1E);..k|DownArro|
|00006380| 77 20 3d 09 09 09 43 48 | 52 28 24 31 46 29 3b 0d |w =...CH|R($1F);.|
|00006390| 09 6b 50 65 72 69 6f 64 | 20 3d 09 09 09 09 43 48 |.kPeriod| =....CH|
|000063a0| 52 28 24 32 45 29 3b 0d | 0d 7b 54 68 69 73 20 62 |R($2E);.|.{This b|
|000063b0| 69 74 20 73 65 74 20 69 | 6e 20 74 68 65 20 69 6f |it set i|n the io|
|000063c0| 46 6c 41 74 74 72 69 62 | 20 66 69 65 6c 64 20 69 |FlAttrib| field i|
|000063d0| 66 20 74 68 65 20 66 69 | 6c 65 d5 73 20 72 65 73 |f the fi|le.s res|
|000063e0| 6f 75 72 63 65 20 66 6f | 72 6b 20 69 73 20 6f 70 |ource fo|rk is op|
|000063f0| 65 6e 2e 7d 0d 09 6b 52 | 65 73 46 6f 72 6b 4f 70 |en.}..kR|esForkOp|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.